C # encapsulation, inheritance, and polymorphism,
Encapsulation
Encapsulates the attributes and implementation details of classes and objects, and only exposes interfaces to control the read and modify access levels of attributes in the program. Class provides three optional access levels: public, protected, and private. By setting different data access levels and customizing data access permissions, You can ensure the unification of data and shared data.
Inheritance
Class Inheritance refers to adding new data and behaviors on the basis of the original class to form a new class. Class inheritance improves code reusability and reduces the burden on developers.
Polymorphism
Polymorphism is based on inheritance. In addition to adding data and methods on the basis of the base class, the methods in the base class can be redefined to make the method more targeted.