Net Core教程

C++ 和 C# 类型转换

本文主要是介绍C++ 和 C# 类型转换,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
C++ C# 备注
HANDLE (void*) System.IntPtr
BYTE (unsigned char) System.Byte
SHORT (short) System.Int16
WORD (unsigned short) System.UInt16
INT (int) System.Int16 Int32
UINT (unsigned int) System.Int16 Int32
LONG (long) System.Int32
ULONG (unsigned long) System.UINT32
DWORD (unsigned long) System.UINT32
DECIMAL System.Decimal
BOOL (long) System.Boolean
CHAR (char) System.Char
LPSTR (char)
LPWSTR (wchar_t
)
LPCSTR (const char)
LPCWSTR (const wchar_t
)
PCHAR (char*)
BSTR
System.String
FLOAT (float) System.Single
DOUBLE (double) System.Double
VARINT System.Object
PBYTE (byte*) System.Byte[]
这篇关于C++ 和 C# 类型转换的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!