Mega Code Archive

 
Categories / C# Book / 01 Language Basics
 

0093 Members

Classes and structs have members that represent their data and behavior. The following table lists the kinds of members a class or struct may contain: Member Description Fields Fields are variables declared at class scope. Constants Constants are fields or properties whose value is set at compile time and cannot be changed. Properties Properties are methods that are accessed as if they were fields. Methods Methods define the actions that a class can perform. Events Events provide event notifications. Operators Overloaded operators. 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. Destructors Destructors are methods that are called by the runtime when the object is about to be removed from memory. Nested Types Nested types are types declared within another type.