Object-oriented concepts:
1. Further encapsulation of objects with the same attributes and methods, the concept of abstraction, is the mold that determines the properties and methods that an object should have.
2. Objects are created from the class (an instance of the object can be called Class).
3. Write a class that creates an object for the class and instantiates the class. Syntax: class instance name =new Class ();
4. Properties: Protect the field and qualify the field assignment and value. (Get and set, see Supplemental)
5. Inheritance: A class derives multiple classes or interfaces for the initialization of the parent class, C # cannot directly implement multiple inheritance, through the interface implementation, the keyword interface. (There are various ways to inherit, add later)
6. Polymorphism: One interface multiple functions, divided into static polymorphism and dynamic polymorphism. Static polymorphism mainly has function overloading and operator overloading. Dynamic polymorphism is mainly abstract to create an abstraction class, put sealed in front of the class as the encapsulation class. (This is not very understanding, write small topic after understanding)
Detailed knowledge:
7. Class default internal (limited access within the same assembly)
8.new overwrite, does not change the parent class method function; Override, override, change the parent method function. Virtual implements the method, and can be overridden by the quilt class; abstract no implementation method, must be overridden, cannot create an instance, can only inherit.
9. After the destructor----The program finishes, the destructor executes; C # has its own GC (garbage collection).
10.out and Ref:ref (there are in-out), parameter values are passed into the function, pass the ref parameter must be initialized first; out (only): Empty the parameter value, must be initialized once.
C # Self-study summary _day2