Ing between C ++ and C # Data Structure Types

Source: Internet
Author: User
Relationship between APIs and C # Data Structure Types

Data Type ing between APIs and C #
API data type Type description C # type API data type Type description C # type
Word 16-bit unsigned integer Ushort Char Character Char
Long 32-bit unsigned integer Int Dwordlong 64-bit long integer Long
DWORD 32-bit unsigned integer Uint HDC Device description table handle Int
Handle Handle, 32-bit integer Int Hgdiobj GDI object handle Int
Uint 32-bit unsigned integer Uint Hinstance Instance handle Int
Bool 32-bit Boolean integer Bool Hwm Window handle Int
Lpstr 32-bit pointer to a character String Hparam 32-bit message Parameters Int
Lpcstr 32-bit pointer to a common character String Lparam 32-bit message Parameters Int
Byte Bytes Byte Wparam 32-bit message Parameters Int

C # Data Type

Simple Type Description Example
Sbyte 8-bit signed integer Sbyte val = 12;
Short 16-bit signed integer Short val = 12;
Int 32-bit signed integer Int val = 12;
Long 64-bit signed integer Long val1 = 12; long val2 = 34l;
Byte 8-bit unsigned integer Byte val1 = 12; byte val2 = 34u;
Ushort 16-bit unsigned integer Ushort val1 = 12; ushort val2 = 34u;
Uint 32-bit unsigned integer Uint val1 = 12; uint val2 = 34u;
Ulong 64-bit unsigned integer Ulong val1 = 12; ulong val2 = 34u; ulong val3 = 56l;
Ulong val4 = 78ul;
Float 32-Bit Single-precision floating point number Float val = 1.23f;
Double 64-bit double-precision floating point number Double val1 = 1.23; double val2 = 4.56d;
L Boolean Type Bool val1 = true; bool val2 = false;
Char Character type, Unicode encoding Char val = 'H ';
Decimal 128-bit decimal type of 28 valid digits Decimal val = 1.23 m;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.