类型 占用字节数(bytes) 可存储范围
bool 根据执行环境而异 true或false
byte 1 byte 0~255之间的整数
char 2 byte 单一字符
decimal 16 bytes
double 8 bytes
float 4 bytes
int 4 bytes
short 2 bytes
long 8 bytes
string 根据字符串长度而异 最多20亿的Unicode字符
object 4 bytes 可存放各种类型的数据
类型 占用字节数(bytes) 可存储范围
bool 根据执行环境而异 true或false
byte 1 byte 0~255之间的整数
char 2 byte 单一字符
decimal 16 bytes
double 8 bytes
float 4 bytes
int 4 bytes
short 2 bytes
long 8 bytes
string 根据字符串长度而异 最多20亿的Unicode字符
object 4 bytes 可存放各种类型的数据