C# 3.0 Properties Acessor Tips
If you are familiar with C# 3.0, you would already noticed the new shortcut for defining a property without the need to declare the variable behind the property, so for creating a property called Length, all what you have to do is write it like this.
public int Length { get; set; }
This is cool as most of our classes contains bunch of properties and this saves sometimes and also it makes the intellisence list of members much shorter, but this is not the whole thing, what if you want to declare a property with a private setter and public getter?
Here comes a cool part :)
public int Length { get; private set; }
Now the Set operation is only accessible inside the class, you can also do stuff like protected, internal for either the set and get, or even remove one of them.
I know that this post sounds a bit old, but I felt it funny when I read the private keyword at the middle of the line :)