Numerische Typen
C# bietet die folgenden vordefinierten numerischen Typen:
|
C#-Typ |
Systemtyp |
Suffix |
Breite |
Bereich |
|---|---|---|---|---|
|
Ganzzahlig mit Vorzeichen | ||||
|
|
|
8 Bit |
–27 bis 27–1 | |
|
|
|
16 Bit |
–215 bis 215–1 | |
|
|
|
32 Bit |
–231 bis 231–1 | |
|
|
|
|
64 Bit |
–263 bis 263–1 |
|
Ganzzahlig ohne Vorzeichen | ||||
|
|
|
8 Bit |
0 bis 28–1 | |
|
|
|
16 Bit |
0 bis 216–1 | |
|
|
|
|
32 Bit |
0 bis 232–1 |
|
|
|
|
64 Bit |
0 bis 264–1 |
|
Reell | ||||
|
|
|
|
32 Bit |
± (~10–45 bis 1038) |
|
|
|
|
64 Bit |
± (~10–324 bis 10308) |
|
|
|
|
128 Bit |
± (~10–28 bis 1028) |
Von den
ganzzahligen Typen sind int und
long Bürger erster Klasse und werden von C# und der Runtime bevorzugt. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access