C # difficulties break down one by one (6): C # Data types and. NET Framework data Types _c# Tutorial

Source: Internet
Author: User
Tags numeric
Among them are the A course in Java programming"is a Chinese-American work, and Nicholas C.zakes's" JavaScript Advanced Programming, and this is the Illustrator C # 2008, translated in Chinese as "illustration c#2008", in fact, not many illustrations. This is the first time I read the original book completely, feeling good deep. One is my English incredibly still can, want to take the test six grade still bad 20 more points, –!! Second, the Foreigner writes the book really is attentively to write, treats own book as treats own child like.

The above is gossip, and always wanted to know how the. NET Framework data storage type is stored in memory, the book is understood in a very straightforward way.

Data types in C # can be divided into simple types and multivalued item types, such as Short,int,long, which can store only one simple data, such as simple types. A multivalued item type, such as an array, that is combined by a simple type of data that can be traversed with index indices for each simple data.

A member includes a data member and a function member. Data members are used to store data, and function members are used to execute code.

There are 15 predefined types in C #, of which 13 simple types (plain type), two not simple types (non-simple types), and 13 simple types that include 11 numeric types, one Unicode character type (that is, char), A Boolean type (that is, BOOL), and a variable-length integer, floating-point type (float and double), and a high precision decimal type in a numeric type. Two types of non-simple type include string, object. Structure as shown below (click to see larger image):


Detailed data types See:http://msdn.microsoft.com/zh-cn/library/exx3b86w%28VS.80%29.aspx

It's worth noting that the data types in C # are lowercase, the Int32, string is a. NET Framework data type, and the. NET Framework is a superset of C #. The corresponding relationship between the two data types is shown in the following figure (click to see larger image)


Generally 32767 is enough for us to use, so a lot of time with convert.toint16 () bar.

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.