C # Reference type and value type 1 differ:
The value type is stored on the stack of memory, and the reference type stores a reference on the memory stack, storing a specific value on the heap.
2 Value type:
// value types: System.ValueType inheritance and System.Object int m; // formal Name: System.Int32 BOOL true ; MyStruct MyStruct; MyEnum MyEnum;
Enum Explanation:
Public enum 0,// default is 0, can also be modified to 1, then the value will be incremented in turn. Tuesday} can also inherit the enum from the short type, and the contents will change accordingly.
Enum Output:
Console.WriteLine (myenum.monday); // Output Monday Console.WriteLine ((int) myenum.monday); // Output 0
3 reference types
Include object, string, dynamic
3.1 Object
Object New Object // normal wording Object New Object (); // capitalization is also correct, equivalent to system. Object
String = Determines whether the content is equal
Object (String) = = Determines the address because it is a reference type, and string is an application type, but is overloaded.
3.2 String,class,interface
C # Reference types and value types