Visual Basic、C# 和 C++ 的数据类型比较(转)
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                Visual Basic、C# 和 C++ 的数据类型比较(转)
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.                        
                                | 類(lèi)別 | 類(lèi)名 | 說(shuō)明 | Visual Basic 數(shù)據(jù)類(lèi)型 | C# 數(shù)據(jù)類(lèi)型 | C++ 托管擴(kuò)展數(shù)據(jù)類(lèi)型 | JScript 數(shù)據(jù)類(lèi)型 | 
| 整數(shù) | Byte | 8 位的無(wú)符號(hào)整數(shù)。 | Byte | byte | char | Byte | 
| DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | SByte | 8 位的有符號(hào)整數(shù)。 不符合 CLS。DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | SByte 無(wú)內(nèi)置類(lèi)型。DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | sbyte | signed char | SByte | 
| DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | Int16 | 16 位的有符號(hào)整數(shù)。 | Short | short | short | short | 
| DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | Int32 | 32 位的有符號(hào)整數(shù)。 | Integer | int | int - 或 -DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se longDZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | int | 
| DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | Int64 | 64 位的有符號(hào)整數(shù)。 | Long | long | __int64 | long | 
| DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | UInt16 | 16 位的無(wú)符號(hào)整數(shù)。 不符合 CLS。DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | UInt16 無(wú)內(nèi)置類(lèi)型。DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | ushort | unsigned short | UInt16 | 
| DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | UInt32 | 32 位的無(wú)符號(hào)整數(shù)。 不符合 CLS。DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | UInt32 無(wú)內(nèi)置類(lèi)型。DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | uint | unsigned int - 或 -DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se unsigned longDZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | UInt32 | 
| DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | UInt64 | 64 位的無(wú)符號(hào)整數(shù)。 不符合 CLS。DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | UInt64 無(wú)內(nèi)置類(lèi)型。DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | ulong | unsigned __int64 | UInt64 | 
| 浮點(diǎn) | Single | 單精度(32 位)浮點(diǎn)數(shù)字。 | Single | float | float | float | 
| DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | Double | 雙精度(64 位)浮點(diǎn)數(shù)字。 | Double | double | double | double | 
| 邏輯 | Boolean | 布爾值(真或假)。 | Boolean | bool | bool | bool | 
| 其他 | Char | Unicode(16 位)字符。 | Char | char | wchar_t | char | 
| DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | Decimal | 96 位十進(jìn)制值。 | Decimal | decimal | Decimal | Decimal | 
| DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | IntPtr | 大小取決于基礎(chǔ)平臺(tái)(32 位平臺(tái)上為 32 位值,64 位平臺(tái)上為 64 位值)的有符號(hào)整數(shù)。 | IntPtr 無(wú)內(nèi)置類(lèi)型。DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | IntPtr 無(wú)內(nèi)置類(lèi)型。DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | IntPtr 無(wú)內(nèi)置類(lèi)型。DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | IntPtr | 
| DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | UIntPtr | 大小取決于基礎(chǔ)平臺(tái)的無(wú)符號(hào)整數(shù)(32 位平臺(tái)上為 32 位值,64 位平臺(tái)上為 64 位值)。 不符合 CLS。DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | UIntPtr 無(wú)內(nèi)置類(lèi)型。DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | UIntPtr 無(wú)內(nèi)置類(lèi)型。DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | UIntPtr 無(wú)內(nèi)置類(lèi)型。DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | UIntPtr | 
| 類(lèi)對(duì)象 | Object | 對(duì)象層次結(jié)構(gòu)的根。 | Object | object | Object* | Object | 
| DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | String | Unicode 字符的不變的定長(zhǎng)串。 | String | string | String* | String | 
DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se
平臺(tái)調(diào)用數(shù)據(jù)類(lèi)型 DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se
DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se
| Wtypes.h 中的非托管類(lèi)型 | 非托管 C 語(yǔ)言類(lèi)型 | 托管類(lèi)名 | 說(shuō)明 | 
| HANDLE | void* | System.IntPtr | 32 位 | 
| BYTE | unsigned char | System.Byte | 8 位 | 
| SHORT | short | System.Int16 | 16 位 | 
| WORD | unsigned short | System.UInt16 | 16 位 | 
| INT | int | System.Int32 | 32 位 | 
| UINT | unsigned int | System.UInt32 | 32 位 | 
| LONG | long | System.Int32 | 32 位 | 
| BOOL | long | System.Int32 | 32 位 | 
| DWORD | unsigned long | System.UInt32 | 32 位 | 
| ULONG | unsigned long | System.UInt32 | 32 位 | 
| CHAR | char | System.Char | 用 ANSI 修飾。 | 
| LPSTR | char* | System.String 或 System.StringBuilder | 用 ANSI 修飾。 | 
| LPCSTR | Const char* | System.String 或 System.StringBuilder | 用 ANSI 修飾。 | 
| LPWSTR | wchar_t* | System.String 或 System.StringBuilder | 用 Unicode 修飾。 | 
| LPCWSTR | Const wchar_t* | System.String 或 System.StringBuilder | 用 Unicode 修飾。 | 
| FLOAT | Float | System.Single | 32 位 | 
| DOUBLE | Double | System.Double | 64 位 | 
轉(zhuǎn)載于:https://blog.51cto.com/dotnet/63448
總結(jié)
以上是生活随笔為你收集整理的Visual Basic、C# 和 C++ 的数据类型比较(转)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
 
                            
                        - 上一篇: 希望不要T我~~哈哈...
- 下一篇: Excel分列功能的妙用
