Data Type
1. Value types
(1) integer type: signed integer and unsigned integer type.
The difference is that unsigned integers are larger than the positive range of a signed integer. 2x+1
signed integer : sbyte,short,int, long with positive negative, range increased by write
unsigned integer : Byte,ushort,uint,ulong only positive, and the range is increased in turn
(2) Float type : float, double, decimal
(3) character type (Unicode type):char= ' Hello world! ’
(4) Boolean type :boll(Ture,false) (judging with T or F)
(5) date Time type :datetime Date Time type save date time
(6)
(7) DateTime type : datetime
(8) enum type : Enum e{...} User-defined type of shape
(9) structure type : struct s{...} Form user-defined type
2. Reference types
(1) String type :string (with double quotation mark "")
String is equivalent to the concept of a character type, long length, the definition of the need to use double quotation marks
(2)var variable type stores all types of data---a wide range of storage types
3. value types differ from reference types:
Value types store numeric values directly, the reference type stores an address, reads the address first, and then reads the value from the address
4. Kanji is a string, can not be converted to int characters, string can not be mathematical operations, the concatenation between the strings with A +, such as : A + "You" +b+ "good" +c
Data types for the C # language Foundation