I. Static)
1. Class: static classes cannot be instantiated. They can only be accessed through classes, can be inherited, and can only contain static members.
2. Members: static members can be declared in static classes or non-static classes.
Ii. Virtual members)
A virtual member can be overwritten in a derived class and cannot be set to private. After rewriting, in a multi-state application, calling this member always executes the rewritten code in the derived class.
Different from hiding a member (using new): hiding a member in a multi-state application. If the Member is called using a base class variable, the code in the base class is executed. (The interface variables are different, so I will not write them in detail here)
Iii. Abstract)
1. Class: the abstract class cannot be instantiated. The only way to use it is inheritance. Abstract classes can contain abstract members or non-Abstract members.
2. member: the abstract member does not execute the code, that is, there is no code body. The code is implemented in the derived class. Abstract members can only be defined in abstract classes.
Differences between abstract classes and interfaces:
1. A derived class can only inherit from one base class (but can contain multiple abstract classes using one inheritance chain). The opposite interface can inherit from multiple interfaces, but this will not produce much difference.
2. abstract classes can contain abstract members (without code bodies) and non-Abstract members (with code bodies, which can be set to virtual), but interface members must be implemented on their classes.
3. If the abstract class member is not an abstract member, you can set the access class to private, protected, internal, or protected internal members. Interface members cannot define their access. They can only use the default value-public ).
4. The interface cannot contain fields, constructors, destructor, static members, or constants (constants are also static members ).