类型 | 资料型态 | 位元 bits | 语法范例 |
布林 | bool | 1 | bool b = false |
正负整数 | sbyte | 8 | sbyte sb = 1 |
short | 16 | short s = 1 | |
int | 32 | int i = 1 | |
long | 64 | long l = 1 | |
正整数 | byte | 8 | byte b = 1 |
ushort | 16 | ushort us = 1 | |
uint | 32 | uint ui = 1 | |
ulong | 64 | ulong ul = 1 | |
浮点数 | float | 32 | float f = 1.0f |
double | 64 | double d = 1.0d | |
decimal | 128 | decimal dl = 1.0m | |
字串 | string | 无上限 | string s = "abc" |
c# 基本类型
最新推荐文章于 2022-05-18 15:14:09 发布