Short Name
|
.NET Class
|
Type
|
Width
|
Range (bits)
|
---|---|---|---|---|
byte
|
Byte
|
Unsigned integer
|
8
|
0 to 255
|
sbyte
|
SByte
|
Signed integer
|
8
|
-128 to 127
|
int
|
Int32
|
Signed integer
|
32
|
-2,147,483,648 to 2,147,483,647
|
uint
|
UInt32
|
Unsigned integer
|
32
|
0 to 4294967295
|
short
|
Int16
|
Signed integer
|
16
|
-32,768 to 32,767
|
ushort
|
UInt16
|
Unsigned integer
|
16
|
0 to 65535
|
long
|
Int64
|
Signed integer
|
64
|
-9223372036854775808 to 9223372036854775807
|
ulong
|
UInt64
|
Unsigned integer
|
64
|
0 to 18446744073709551615
|
float
|
Single
|
Single-precision floating point type
|
32
|
-3.402823e38 to 3.402823e38
|
double
|
Double
|
Double-precision floating point type
|
64
|
-1.79769313486232e308 to 1.79769313486232e308
|
char
|
Char
|
A single Unicode character
|
16
|
Unicode symbols used in text
|
bool
|
Boolean
|
Logical Boolean type
|
8
|
True or false
|
object
|
Object
|
Base type of all other types
| ||
string
|
String
|
A sequence of characters
| ||
decimal
|
Decimal
|
Precise fractional or integral type that can represent decimal numbers with 29 significant digits
|
128
|
±1.0 × 10e−28 to ±7.9 × 10e28
|
ชนิดของข้อมูล C#
ภาษา C# มีชนิดของข้อมูลดังนี้
ที่มา : https://msdn.microsoft.com/en-us/library/ms228360(v=vs.90).aspx
0 ความคิดเห็น:
แสดงความคิดเห็น