日期:2014-05-20 浏览次数:21081 次
class Person
{
    public string Name
    {
        get;
        set;
    }
    public int Age
    {
        get;
        set;
    }
    
    public string Address
    {
        get;
        set;
    }
    public string EMail
    {
        get;
        set;
    }
    public string Phone
    {
        get;
        set;
    }
    
    public DateTime Birthday
    {
        get;
        set;
    }
    public Person() 
    {
    }
    public Person(
        string name, 
        int age, 
        string address, 
        string email, 
        string phone, 
        DateTime birthday
    )
    {
        Name = name; 
        Age = age;
        Address = address;
        EMail = email;
        Phone = phone; 
        Birthday = birthday;
    }
}
class Person
{
    public string Name { get; set; }
    public int Age { get; set; }
    public string Address { get; set; }
    public string EMail { get; set; }
    public string Phone { get; set; }    
    public DateTime Birthday { get; set; }
    
    public Person() { }
    public Person(string name, int age, string address, string email, 
        string phone, DateTime birthday)
    {
        Name = name; Age = age; Address = address; EMail = email;
        Phone = phone; Birthday = birthday;
    }
}
Func<int, int, int> IntPow = 
(x, y) => { 
              int r = x; 
              for (int i = 1; i < y; i++) r *= x;
              return r;
          }
Console.WriteLine(IntPow(3, 2));
class FileSystem
{
    public virtual void SetInfo(FileSystemInfo info) { ... }
}
class Fat32FileSystem : FileSystem
{
    public virtual void SetInfo(Fat32FileSystemInfo info) { ... }
}
class class FileSystemInfo 
{
    ...
}
class class Fat32FileSystemInfo : FileSystemInfo
{
    ...
}