Datentypen und deren Verwendung (C#)
(von Drasko)
In diesem Tutorial erläutere ich kurz alle Datentypen, deren Verwendung und Datenbereich. Bei Fragen und Feedback könnt ihr gerne Antworten posten
Viel Spaß beim Lesen!
[table='Name, .NET-Klasse, Wertebereich, Beispiel']
[*] bool [*] System.Boolean [*] true - false [*] bool Weiblich = true;
[*] byte [*] System.Byte [*] 0 - 255 [*] byte fileSize = 32;
[*] char [*] System.Char [*] A-Z (+ Unicode) [*] char Buchstabe = 'f';
[*] decimal [*] System.Decimal [*] ±1.0 × 10-28 - ±7,9 × 1028 [*] decimal Geld = 300.5m;
[*] double [*] System.Double [*] ±5.0 × 10−324 bis ±1,7 × 10308 [*] double Gleitkommazahl = 3.5d;
[*] float [*] System.Single [*] ±1.5 × 10-45 - ±3,4 × 1038 [*] float Gleitkommazahl = 3.5f;
[*] int [*] System.Int32 [*] -2.147.483.648 - 2.147.483.647 [*] int i = 1;
[*] long [*] System.Int64 [*] -9.223.372.036.854.775.808 bis 9.223.372.036.854.775.807 [*] long Long1 = 399453355;
[*] sByte [*] System.SByte [*] -128 bis 127 [*] sByte sByte1 = 125;
[*] short [*] System.Int16 [*] -32.768 bis 32.767 [*] short x = 3456;
[*] uint [*] System.UInt32 [*] 0 - 4.294.967.295 [*] uint uIntTest = 353653465;
[*] ulong [*] System.UInt64 [*] 0 - 18.446.744.073.709.551.615 [*] ulong myULong = 657574673;
[*] ushort [*] System.UInt16 [*] 0 - 65.535 [*] ushort myShort = 65535;
[/table]
Ich hoffe die Refferenzl hat euch gefallen und ihr habt einen Überblick.
- Drasko
[/table]
Ich hoffe die Refferenzl hat euch gefallen und ihr habt einen Überblick.
- Drasko
Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von Drasko ()