Home  >  Article  >  Backend Development  >  C# difficulties are broken down one by one (6): C# data types and .net framework data types

C# difficulties are broken down one by one (6): C# data types and .net framework data types

黄舟
黄舟Original
2016-12-22 14:18:121517browse

Among them are "Java Programming Tutorial", which is the work of a Chinese-American, and "Javascript Advanced Programming" by Nicholas C. Zakes, and this book Illustrator C# 2008, which is translated in Chinese as "Illustration Detailed Explanation of C# 2008" , not many illustrations actually. This is the first time I have read the original book in its entirety, and I am deeply moved. Firstly, my English is actually pretty good. I think I was still more than 20 points short of taking the CET-6 exam, –!! Secondly, foreigners really put their heart into writing books and treat their own books just like they treat their own children.

The above is just gossip. I have always wanted to know how the .net framework data storage type is stored in the memory. This book explains it clearly in a very easy-to-understand way.

Data types in C# can be divided into simple types and multi-valued item types; such as short, int, and long are called simple types, and they can only store a certain type of simple data. Multi-valued item types such as array, which are composed of simple types of data, can use index index to traverse each simple data.

Members include data members and function members. Data members are used to store data, and function members are used to execute code.

C# difficulties are broken down one by one (6): C# data types and .net framework data types

There are 15 predefined types in C#, including 13 simple types and two non-simple types; the 13 simple types include 11 numeric types, one Unicode character type (i.e. char), a boolean type (i.e. bool); numeric types include variable-length integers, floating point types (float and double), and high-precision decimal types. The two non-simple types include string and object. The structure is as shown below (you can click to see the larger picture):

C# difficulties are broken down one by one (6): C# data types and .net framework data types

It is worth noting that the data types in C# are all lowercase. The commonly used Int32 and String are .net framework data types, and .net framework is C#. superset of . The corresponding relationship between the two data types is shown in the picture below (you can click to see the larger picture)

The above is the breakdown of C# difficulties one by one (6): C# data types and .net framework data types. For more related content, please pay attention to the PHP Chinese website ( www.php.cn)!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn