共用方式為


Windows 執行時間基底數據類型

下表列出 Windows 運行時間支援的基底數據類型,並指出 C#、Visual Basic 和 C++中的對應類型。

數據類型 JavaScript C# VB C++
布爾值 布爾值 布爾 布爾值 布爾
位元組 數位 位元組 位元組 不帶正負號的字元
Char 字串 char Char 不帶正負號的字元
Char16 字串 char Char wchar_t
DateTime 日期 DateTimeOffset DateTimeOffset DateTime
數位
Guid 字串 Guid Guid Guid
Int16 數位 簡短 簡短 簡短
Int32 數位 int 整數 int
Int64 數位 __int64
物件 物件 物件 物件 Object^
Rect Rect Rect Rect Rect
單一 數位 float 單一 float
大小 大小 大小 大小 大小
字串 字串 字串 字串 String^
TimeSpan 數位 TimeSpan TimeSpan TimeSpan
UInt8 數位 位元組 位元組 不帶正負號的字元
UInt16 數位 ushort UShort 不帶正負號的簡短
UInt32 數位 uint UInteger 未簽署的 int
UInt64 數位 ulong ULong 不帶正負號的__int64
URI URI URI URI Uri^
Void 未定義 void Void void

 

下表指出對應至 Windows 執行時間數據類型的 .NET 類型。

Windows 運行時間 。網
布爾值 System.Boolean
位元組 System.Byte
Char System.Char
Char16 System.Char
DateTime System.DateTimeOffset
System.Double
Guid System.Guid
Int16 System.Int16
Int32 System.Int32
Int64 System.Int64
物件 System.Object
單一 System.Single
字串 System.String
TimeSpan System.TimeSpan
UInt8 System.Byte
UInt16 System.UInt16
UInt32 System.UInt32
UInt64 System.UInt64
URI System.Uri
Void System.Void