Class is the most common type of reference, the simplest of which is defined as
Class youclassnam{}
A complex class might contain a bit of content
Class attribute Class property and class modifier. Non-nested class modifiers are: Public,internal,abstract,sealed,static, unsafe,partial
Class name various type parameters, unique base class, multiple interfaces
Inside curly Braces Class members (methods, member properties, indexers, events, fields, constructor methods, operator functions, nested types, and terminators)
1----> Fields
A field is a variable in a class or struct body.
Fields do not have to be initialized, and fields that are not initialized are assigned a default value (0,\0,null,false). Field initialization statements are executed before the method is constructed
A read-only field can be assigned only at the time of declaration or in the class construction method to which it belongs, and cannot be changed after the assignment.
Multiple fields can be declared by a colleague
Class myone{
static readonly int leg=8,eye=2; string name; public int age=10; }
The following modifiers can be used to modify a field
static modifier--------------Static
Access permission modifier----------public internal private protected
Inheritance modifier--------------New
Insecure code modifier--------Unsafe
Read-only modifier--------------readonly
Cross-thread access modifier--------volatile
Create a class in C # (in update)