by

Tipe Data Numerik di CSharp

Pada tabel berikut ini akan memberikan sedikit penjelasan singkat kepada Anda tentang tipe data numerik di (CSharp) C#, berkaitan dengan tipe data pada .NET Framework dan nilai yang dapat disimpannya.

Tipe Data C# Tipe Data .NET Byte Nilai Minimum Nilai Maksimum
sbyte System.Sbyte 1 -128 127
byte System.Byte 1 0 255
short System.Int16 2 -32,768 32,767
ushort System.UInt16 2 0 65,535
int System.Int32 4 -2,147,483,648 2,147,483,647
uint System.UIn t32 4 0 4,294,967,295
long System.Int64 8 –9,223,372,036,854,775,808 9,223,372,036,854,775,807
ulong System.UInt64 8 0 18,446,744,073,709,551,615
char System.Char 2 0 65,535
float System.Single 4 1.5 x 10-45 3.4 x 1038
double System.Double 8 5.0 x 10-324 1.7 x 1010308
bool System.Boolean 1 false (0) true (1)
decimal System.Decimal 16 1.0 x 10-28 7.9 x 1028

Comment

Leave a Reply

Your email address will not be published. Required fields are marked *