-
Notifications
You must be signed in to change notification settings - Fork 0
Class members
JonathanOrr edited this page Aug 25, 2023
·
1 revision
| Member | Description |
|---|---|
Fields |
Fields are variables declared at class scope. A field may be a built-in numeric type or an instance of another class. For example, a calendar class may have a field that contains the current date. |
Properties |
Properties are methods on a class that are accessed as if they were fields on that class. A property can provide protection for a class field to keep it from being changed without the knowledge of the object. |
Methods |
Methods define the actions that a class can perform. Methods can take parameters that provide input data, and can return output data through parameters. Methods can also return a value directly, without using a parameter. |
Operators |
Overloaded operators are considered type members. When you overload an operator, you define it as a public static method in a type. For more information, see [Operator overloading]. |
Indexers |
Indexers enable an object to be indexed in a manner similar to arrays. |
Constructors |
Constructors are methods that are called when the object is first created. They are often used to initialize the data of an object. |