C#数据类型列表

C#数据类型列表
类型 大小 示例
bool 布尔值,true或false bool isStudent = ture
byte 无符号8位整数 byte myByte = 2
sbyte 有符号8位数 sbyte mySbyte = -100
char 16位Uniicode字符 char male = 'M'
decimal 128位浮点数,精确道小数点后28~29位 decimal result = 1200.56M
double 64位浮点数,精确道小数点后15~16位 double cash = 35.23D
float 32位浮点数,精确道小数点后7位 float score = 59.9F
int 有符号32位整数 int count = 800
uint 无符号32位整数 uint sum = 600
long 有符号64位整数 long population = 294967296
ulong 无符号64位整数 ulong height = 92233720368547
short 有符号16位整数 short salary = 3500
ushort 无符号16位整数 ushort money = 2000
string Uniicode字符串,引用类型 string color = "red"
posted @ 2020-06-30 11:35  刘铁柱a  阅读(449)  评论(0编辑  收藏  举报