The set of class members consists of the members declared directly in the class body and the members inherited from the parent class.
The members of a class are divided into the following categories:
Constants, which represent constant values associated with the class.
Fields, which are class variables.
Properties, which determine named class characteristics and actions associated with reading and writing these characteristics.
Methods, which implement the calculations and actions associated with the class.
Events, which determine notifications that can be generated by the class.
Instance constructors, which determine the actions required to initialize instances of the given class objects.
Static constructors, which implement the actions required to initialize the class itself.
Members that contain executable code are collectively known as the function members. Function members of a class are the methods, properties, events, and constructors of this class.
A class declaration creates a new declaration space, and the class members declared within this space become members of this declaration space. The following rules apply to class member declarations:
The class member names must differ from the class names.
Class member names must be unique within this class.
Inherited class members are not part of the declaration space of a class. Thus, a derived class is allowed to declare a member with the same name as a basic class member, which in this case hides the inherited member.
Additional information is contained in the following subsections:
See also: