新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
關(guān)于C++和C#類型比較的相關(guān)表格
C#類型比較

創(chuàng)新互聯(lián)為客戶提供專業(yè)的成都網(wǎng)站設(shè)計(jì)、成都網(wǎng)站制作、程序、域名、空間一條龍服務(wù),提供基于WEB的系統(tǒng)開發(fā). 服務(wù)項(xiàng)目涵蓋了網(wǎng)頁設(shè)計(jì)、網(wǎng)站程序開發(fā)、WEB系統(tǒng)開發(fā)、微信二次開發(fā)、手機(jī)網(wǎng)站制作設(shè)計(jì)等網(wǎng)站方面業(yè)務(wù)。
| 類別 | 類名 | 說明 | Visual Basic 數(shù)據(jù)類型 | C# 數(shù)據(jù)類型 | C++ 托管擴(kuò)展數(shù)據(jù)類型 | JScript 數(shù)據(jù)類型 |
| 整數(shù) | Byte | 8 位的無符號(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 無內(nè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 位的無符號(hào)整數(shù)。 不符合 CLS。DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | UInt16 無內(nè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 位的無符號(hào)整數(shù)。 不符合 CLS。DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | UInt32 無內(nè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 位的無符號(hào)整數(shù)。 不符合 CLS。DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | UInt64 無內(nè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 無內(nèi)置類型。DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | IntPtr 無內(nèi)置類型。DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | IntPtr 無內(nè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)的無符號(hào)整數(shù)(32 位平臺(tái)上為 32 位值,64 位平臺(tái)上為 64 位值)。 不符合 CLS。DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | UIntPtr 無內(nèi)置類型。DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | UIntPtr 無內(nèi)置類型。DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | UIntPtr 無內(nèi)置類型。DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | UIntPtr |
| 類對(duì)象 | Object | 對(duì)象層次結(jié)構(gòu)的根。 | Object | object | Object* | Object |
| DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se | String | Unicode 字符的不變的定長串。 | String | string | String* | String |
DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se
DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se
C#類型比較—平臺(tái)調(diào)用數(shù)據(jù)類型DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se
DZX7¢?&dot÷ [url]www.cnntec.com[/url]¨…gúT??se
| Wtypes.h 中的非托管類型 | 非托管 C 語言類型 | 托管類名 | 說明 |
| 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 位 |
C++和C#類型比較
【編輯推薦】
- 定義C#接口學(xué)習(xí)經(jīng)驗(yàn)
- C# ListBox學(xué)習(xí)筆記
- 操作C# Dataset介紹
- C# ODBC訪問MySQL數(shù)據(jù)庫
- 淺析C#和Java不同點(diǎn)
網(wǎng)頁標(biāo)題:關(guān)于C++和C#類型比較的相關(guān)表格
轉(zhuǎn)載來于:http://m.fisionsoft.com.cn/article/djjjheo.html


咨詢
建站咨詢
