大家好,能不能帮我填一下在VB.net中的数据类型与Vc++6.0的对应数据类型,因为我要使用.net调用VC++6.0的dll
老是搞不清楚其对应关系很麻烦。谢谢!VB.net VC++6.0 取值范围
Boolean True 或 False
Byte 0到255(无符号)
Char 0到65535(无符号)
Date 0001年1月1日 0:00:00到9999年12月31日11:59:59
Decimal 货币型
Double -1.797 693 134 862 315 70E+308到1.797 693 134 862 315 70E+308
Integer -2147483648到2147483647(有符号),同int32
Long -9223372036854775808到9223372036854775807  同int64
Object 任何类型
Sbyte -128-127(有符号)
Short -32768到32767(有符号),同int16
Single 负值为-3.402 823 5e+38到-1.401 298e-45;正值为1.401 298e-14到3.402 823 5e+38
String 0到大约20亿个Unicode字符
Uinteger 0到4 294 967 295 (无符号)
Ulong 0到18446 744 073 709 551615 (无符号)
Ushort 0到65 535无符号

解决方案 »

  1.   

    天啦!怎么会这么乱,再试一下
    VB.net VC++ 取值范围
    Boolean        True 或 False
    Byte        0到255(无符号)
    Char        0到65535(无符号)
    Date        0001年1月1日 0:00:00到9999年12月31日11:59:59
    Decimal        货币型
    Double        -1.797 693 134 862 315 70E+308到1.797 693 134 862 315 70E+308
    Integer        -2147483648到2147483647(有符号),同int32
    Long        -9223372036854775808到9223372036854775807  同int64
    Object        任何类型
    Sbyte        -128-127(有符号)
    Short        -32768到32767(有符号),同int16
    Single        负值为-3.402 823 5e+38到-1.401 298e-45;正值为1.401 298e-14到3.402 823 5e+38
    String        0到大约20亿个Unicode字符
    Uinteger        0到4 294 967 295 (无符号)
    Ulong        0到18446 744 073 709 551615 (无符号)
    Ushort        0到65 535无符号
      

  2.   

    MSDN:ms-help://MS.VSCC.v90/MS.MSDNQTR.v90.chs/dv_vccore/html/7f116a9a-26cd-46db-9877-a63ffdc88723.htm
    Visual C++ 类型
     .NET Framework 类型
     
    bool 
     System.Boolean 
     
    signed char(有关更多信息,请参见 /J)
     System.SByte 
     
    unsigned char 
     System.Byte 
     
    wchar_t 
     System.Char 
     
    double 和 long double
     System.Double 
     
    float 
     System.Single 
     
    int、signed int、long 和 signed long
     System.Int32 
     
    unsigned int 和 unsigned long
     System.UInt32 
     
    __int64 和 signed __int64
     System.Int64 
     
    unsigned __int64 
     System.UInt64 
     
    short 和 signed short
     System.Int16 
     
    unsigned short 
     System.UInt16 
     
    void 
     System.Void