VB、C++、C#、JS 变量类型对照表

CategoryClass nameDescriptionVisual Basic data typeC# data typeManaged Extensions for C++ data typeJScript data type
Integer Byte An 8-bit unsigned integer. Byte byte char Byte
    SByte An 8-bit signed integer.

Not CLS-compliant.

SByte

No built-in type.

sbyte signed char SByte
    Int16 A 16-bit signed integer. Short short short short
    Int32 A 32-bit signed integer. Integer int int

-or-

long

int
    Int64 A 64-bit signed integer. Long long __int64 long
    UInt16 A 16-bit unsigned integer.

Not CLS-compliant.

UInt16

No built-in type.

ushort unsigned short UInt16
    UInt32 A 32-bit unsigned integer.

Not CLS-compliant.

UInt32

No built-in type.

uint unsigned int

-or-

unsigned long

UInt32
    UInt64 A 64-bit unsigned integer.

Not CLS-compliant.

UInt64

No built-in type.

ulong unsigned __int64 UInt64
Floating point Single A single-precision (32-bit) floating-point number. Single float float float
    Double A double-precision (64-bit) floating-point number. Double double double double
Logical Boolean A Boolean value (true or false). Boolean bool bool bool
Other Char A Unicode (16-bit) character. Char char wchar_t char
    Decimal A 96-bit decimal value. Decimal decimal Decimal Decimal
    IntPtr A signed integer whose size depends on the underlying platform (a 32-bit value on a 32-bit platform and a 64-bit value on a 64-bit platform). IntPtr

No built-in type.

IntPtr

No built-in type.

IntPtr

No built-in type.

IntPtr
    UIntPtr An unsigned integer whose size depends on the underlying platform (a 32- bit value on a 32-bit platform and a 64-bit value on a 64-bit platform).

Not CLS-compliant.

UIntPtr

No built-in type.

UIntPtr

No built-in type.

UIntPtr

No built-in type.

UIntPtr
Class objects Object The root of the object hierarchy. Object object Object* Object
    String An immutable, fixed-length string of Unicode characters. String string String* String

 

貌似这列是VB.NET,我补充一下VC++到VB6的:

BOOL就是Byte (BOOL是CHAR=BYTE)

DWORD是LONG

Handle是Long型

BOOLEAN是Byte




[本日志由 JiaJia 于 2007-10-01 11:27 AM 编辑]
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
评论: 0 | 引用: 0 | 查看次数: -
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.