Friday, June 19, 2009

C# Members

Members (C# Programming Guide)
Classes and structs have members that represent their data and behavior. Those members include:
Fields (C# Programming Guide)
Fields are instances of objects that are considered part of a class, normally holding class data. For example, a calendar class may have a field that contains the current date.
Properties (C# Programming Guide)
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 object's knowledge.
Methods (C# Programming Guide)
Methods define the actions that a class can perform. Method 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.
Events (C# Programming Guide)
Events are a way of providing notifications about occurrences, such as button clicks or the successful completion of a method, to other objects. Events are defined and triggered using delegates. For more information, see
Events and Delegates.
Operators (C# Programming Guide)
Operators are terms or symbols such as +, *, <, and so on that perform operations on operands. Operators can be redefined to perform operations on custom data types. For more information, see
Overloadable Operators (C# Programming Guide).
Indexers (C# Programming Guide)
Indexers allow an object to be indexed in a manner similar to arrays.
Constructors (C# Programming Guide)
Constructors are methods that are called when the object is first created. They are often used to initialize the object's data.
Destructors (C# Programming Guide)
Destructors are methods that are called by the runtime execution engine when the object is about to be removed from memory. They are generally used to make sure that any resources which need to be released are handled appropriately.
Nested Types (C# Programming Guide)
Nested Types are types declared within a class or struct. Nested Types are often used to describe objects used only by the types containing them.

1 comment: