Useful C# 3.0 Language Feature

The project that I am currently working on has started to use C# 3 features so I thought that I would see what they were about.

Here is an explanation of automatic properties in C# 3.0.

Basically if you declare a property as:

public int FooBar {get; set;}

then the compiler will create the private storage for you.
If you do anything different then it will leave it to you.

Here is an explanation of extension methods.

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s