您好,登录后才能下订单哦!
密码登录
            
            
            
            
        登录注册
            
            
            
        点击 登录注册 即表示同意《亿速云用户服务条款》
        | 
 C#类型  | 
 C++/CLI类型  | 
 .NET框架类型  | 
 值类型  | 
 字节/位数  | 
 范围和精度  | 
| 
 bool   | 
 bool  | 
 System.Boolean   | 
 真或假  | 
 -/1  | 
 true或false  | 
| 
 char   | 
 wchar_t  | 
 System.Char   | 
 字符  | 
 2/16  | 
 所有UTF-16编码(0~0xFFFF)  | 
| 
 sbyte  | 
 [signed] char  | 
 System.SByte   | 
 整数  | 
 1/8  | 
 -128 ~ 127  | 
| 
 byte  | 
 unsigned char  | 
 System.Byte   | 
 1/8  | 
 0 ~ 255  | |
| 
 short   | 
 [signed] short  | 
 System.Int16   | 
 2/16  | 
 -32 768 ~ 32 767  | |
| 
 ushort   | 
 unsigned short  | 
 System.UInt16   | 
 2/16  | 
 0 ~ 65 535  | |
| 
 int  | 
 [signed] int/long  | 
 System.Int32   | 
 4/32  | 
 -2 147 483 648 ~ 2 147 483 647  | |
| 
 uint  | 
 unsigned int/long  | 
 System.UInt32   | 
 4/32  | 
 0 ~ 4 294 967 295  | |
| 
 long  | 
 [signed] long long  | 
 System.Int64   | 
 8/64  | 
 -9 223 372 036 854 775 808 
~ 9 223 372 036 854 775 807  | |
| 
 ulong   | 
 unsigned long long  | 
 System.UInt64   | 
 8/64  | 
 0 ~ 18 446 744 073 709 551 615  | |
| 
 float   | 
 float   | 
 System.Single   | 
 浮点数  | 
 4/32  | 
 ±1.5×10-45 ~ ±3.4×1038  | 
| 
 double  | 
 double  | 
 System.Double   | 
 8/64  | 
 ±5.0×10-324 ~ ±1.7×10308  | |
| 
 decimal   | 
 Decimal  | 
 System.Decimal   | 
 高精度十进制小数  | 
 16/128  | 
 ±1.0×10-28 ~ ±7.9×1028  | 
int i = 1; 
MyClass obj; 
Console::WriteLine(L"The type of variable i is {0} and object obj is {1}.", i.GetType(), obj->GetType()); 
decimal money = 1234.5m; // 正确 
decimal d = 1234.5; // 编译错误
// C++/CLI例 
decimal d = 1234.5; // 编译错误 
Decimal money = Decimal(1234.5); // 正确免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。