Tuesday, June 24, 2008

Fun with C# 3.0 (#2)

This one is a quickie. Auto-implemented properties.

It allows you specify the property and have the compiler automatically define a backing private instance member. It is way cool.

public class Employee
public string Name { set; get; }
public string Job { set; get; }
public int Age { set; get; }

No comments: