Variables and constants in C #
C # basic data types: Value Type and reference type
Value Type: simple type, structure type, and enumeration type.
Simple Type: integer, floating point, decimal, and Boolean
Sbyte is signed and equivalent to the byte type of java, range:-128 ~ 127
In C #, byte is unsigned and ranges from 0 ~ 255
Object-oriented in C #
Destructor: The function name is the same as the constructor name ,~ Function Name (). parameters are not accepted and are automatically called by the garbage collector (GC. Collect)
Virtual Keyword: in C #, to override the method of the parent class, the method of the parent class must be identified as virtual (virtual), and the override method must be modified with override.
New Keyword: A new method defined in the subclass is the same as the signature of the parent method. It is not a method to override the parent class.
Base Keyword: Use the base keyword to call the method of the parent class
Access modifier:
Public,
Internal in a project,
Protected Parent-Child class,
Private is only a member of the class.