Field: a global variable with a value feature. The Camel name method (getNameString) must be used. A single field is used for security issues;
Methods: Functions in the class with functional features;
Attribute: a mechanism used to state members in the condition class. It is a combination of fields and methods. The essence of the attribute is the method. When using the field, the method is implemented;
Must use the Pascal naming method GetNameString ).
Constructor: a field member in the initialization class. The constructor name has the same name as the class and has no return type. It is called when the object is created by the CLR public language runtime.
The default constructor is not explicitly written when any constructor is created. If no parameter is specified, fields in the class are initialized to the default values of the type. All reference types are initialized to null, no wallet ).
General constructor: Once Any constructor is written, the implicit default constructor disappears.
This Keyword: You can use methods, attributes, and constructor methods within the class, pointing to a reference of the currently used object. This indicates the object created with this class ).
Structure: there can also be constructor in the structure, with the same name as the structure name.
The implicit construction method without parameters of the structure does not disappear with the explicit construction method.
All field members in the structure must be initialized in the constructor of the structure.
The structure cannot have an explicit parameter-free structure.
All structures are value-type, and all classes are reference types, because value-type variables are stored in the stack area with limited size), and reference-type variables are stored in the heap area, therefore, you can use classes without structure.
Each member in the enumeration can be assigned no value, so the values of each member are determined in order.
Enumeration and integer types can be converted to each other.
Enumeration --> String: ToString ()
String --> enumeration: (Enumeration type name) Enum. Parse (typeof (Enumeration type name), string)
The most important purpose of enumeration is to limit the optional range of method parameters.
String: String, which is a reference type and passed as a value type.
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/2013412606-0.gif "/> string in a variety of methods should also pay attention !!!
This article is from the "Lanting drunk beauty" blog and is not reposted!