Automatic Properties - in Case You Didn't Know

The following snippet of code (C# 3.5) is allowable, and gives you the benefit of unnecessary extra verbosity with the benefits of encapsulation. Of course, if you need to implement logic in your property, then you don’t want to think about automatic properties:
public T Item { get; private set; }

Comments