public class Employee
{
    public static int NumberOfEmployees;
    private static int counter;
    private string name;

    // 一个读写属性实例
    public string Name
    {
        get { return name; }
        set { name = value; }
    }

    // 一个只读静态属性
    public int Counter
    {
        get { return counter; }
    }

    // 一个构造器
    public Employee()
    {
        // 计算一个雇员号码
        counter = ++counter + NumberOfEmployees;
    }
}

class TestEmployee
{
    static void Main()
    {
        Employee.NumberOfEmployees = 100;
        Employee e1 = new Employee();
        e1.Name = "Claude Vige";

        System.Console.WriteLine("Employee number: {0}", Employee.Counter);
        System.Console.WriteLine("Employee name: {0}", e1.Name);
    }
}
