C # Data Type: 1, Value Type: Simple Types / Struct Types / Enumeration Types Simple Type 4.1.1 Nine Integer Types: Short Texture (Sbyte) byte (Byte) Short Ushort, Int, UINT, long, ulong.4.1.2 Boolean: True false4.1.3 Real Type: Floating point type Float Double Double Decimal Decimal D_Value = 1.0m; 4.1.4 Character Type: Using Unicode Character Set. A Unicode Standard Length is 16 Char c = 'a'; char c = '/x0032'; 4.1.5 Structure Type: struct phonebook {public string name; public string phone; public string address;} Phonebook P1; 4.1.6 enumeration Type: Enumeration Each element type is INT type .enum weekday {Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday}; Weedday Day; 2, Reference Type: Class. Representative (DELEGATE). Array. Interface "Quote" The meaning of the word is that the variable of this type does not directly store the included value, but points to the value it to be stored. That is, the reference type stores the address of the reference value of the actual data. The class declaration format is as follows: Attributes class- Modifiers Class Identifier Class-Base Class-Body; Class-Modifiers For class modes, keyword class, followed by the class name Identifier, class-base, and class-body indicate inheritance mode and base class name. Class modifier Or combination thereof (multiple times in the same modifier in the category) 1, New public allows usage, 2, and public expressions do not limit access to this class. 3. Protected represents only from the subclass of the class and secrets. 4, INTERNAL is only available to visit. 5. Private only has an application or library in the package .NET to access. 6. Abstract abstraction class does not allow instances of the class. 7, Sealed seals, not allowed to be inherited. Members of the class: constructor and destructive functions, which are used to initialize and destroy the instances of the class. 4.3 Packing and Unpacking Core Concept: Packing and Unpacking Mechanism In C # Type System, any value type. The reference type and Object type are converted. It is called a binding connection. Simple saying, In the case of any type of value, we must not be seen as an object type. 4.3.1 Packing conversion: Refers to the type of value type into an Object type. Or guide this value type Convert into an interface type (interface-type) that is applied by this value. Put a value type, which is created an Object instance and copy this value to this object. Such as: int i = 10; Object Obj = i Explicit method: INT i = 10; Object obj = Object (i); the value of the type of packing is a 4.3.2 unpacking conversion for a copy assignment: the opposite. Object type ---> The value type or explicitly convert an interface type into a value type that executes the interface. Second steps of the box: Check this object instance, see if it is a given value type, and then this instance Value copy to value variables .int i = 10; object obj = i; int J = (int) OBJ;