Class Properties, Fields, and Methods
In general, fields and properties represent information about an object, whereas methods represent actions an object can take.
The following topics describe the mechanisms for adding properties, fields, and methods to your classes, and address issues associated with these items.
In This Section
- Adding Fields and Properties to a Class
- Provides information on declaring fields and properties.
- Properties and Property Procedures
- Explains how Property procedures work, and how to implement common property types.
- Property Procedures vs. Fields
- Helps you decide when to use fields to store data in a class, and when properties are a better choice.
- Class Methods
- Discusses the public procedures you add to your class.
- Properties vs. Methods
- Helps you decide whether your desired functionality is best implemented as a property or a method.
- Default Properties
- Discusses properties that are used when no specific property is named.
- Overloaded Properties and Methods
- Covers how to define multiple properties or methods that have the same name, but work with different data types.
- Overriding Properties and Methods
- Discusses redefining an inherited property or method.
- Object Management with Collections
- Provides information on using collections to store and retrieve objects.