C++ 原生型別的 .NET Framework 對應項 (C++/CLI)
下表顯示內建 Visual C++ 型別的關鍵字,這些是 System 命名空間裡預先定義型別的別名。
Visual C++ 型別 |
.NET Framework 型別 |
---|---|
bool |
System.Boolean |
signed char (如需詳細資訊,請參閱 /J) |
System.SByte |
unsigned char |
System.Byte |
wchar_t |
System.Char |
double 和 long double |
System.Double |
float |
System.Single |
int、signed int、long 和 signed long |
System.Int32 |
unsigned int 和 unsigned long |
System.UInt32 |
__int64 和 signed __int64 |
System.Int64 |
unsigned __int64 |
System.UInt64 |
short 和 signed short |
System.Int16 |
unsigned short |
System.UInt16 |
void |
System.Void |