Access modifiers:
Access modifiers are a permission limit for cross-class access
Public: The reference namespace is free to access, with the highest access rights.
Private: It can only be accessed in the class and structure in which it is declared, with the lowest access rights.
Internal: Internal, all classes in the same assembly can be accessed, and assemblies are namespaces.
Protected: Protected, can only be accessed in his own and in his own subclasses.
Inherited:
There are subclasses of the parent class that have and allow subclasses to inherit, a parent class can have more than one child class, and a subclass may have only a parent class.
Class bird:fly// front is subclass, followed by parent class
Subclasses can be converted to parent classes, which can only be converted to subclasses that were previously converted to the parent class.
static method:
Static methods and properties are used to define them;
Non-static methods need to instantiate the object and then invoke it with the object;
Random r = new Random ();
R.next (); --How to use non-static methods
static method, do not need to instantiate the object, directly with the class can point out to use;
Console.Write (); --How to use static methods
Access modifiers and inheritance