#285 – Class Member Overview

A class in C# can contain the following types of members:

Member Type Description Private / Public Instance / Static
Constants Constant values x
Fields Variables that can be read/written x x
Methods Procedure that can be called to perform some logic x x
Properties Data storage item that can have associated get/set behavior x x
Indexers Allows an instance of class to be indexed like an array x
Events Allows the class to notify client code when some condition occurs x x
Operators Defines behavior for class when instances are used within expressions using standard operators public static
Constructors Method that is called when an instance of the class is created x x
Destructors Method that is automatically called by the garbage collector before an object’s memory is released

Types Nested type declared inside the class x

About Sean
Software developer in the Twin Cities area, passionate about .NET technologies. Equally passionate about my own personal projects related to family history and preservation of family stories and photos.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: