using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Robot
{
class TestPeople
{
static void Main(string[] args)
{
People p = new People();
Console.WriteLine("{0} {1}", p.Name, p.Age);
People p2 = new People("张三");
Console.WriteLine("{0} {1}", p2.Name, p2.Age);
People p3 = new People("李四", 20);
Console.WriteLine("{0} {1}", p3.Name, p3.Age);
Console.ReadKey();
}
}
class People
{
public string Name { set; get; }
public int Age { set; get; }
public People()
{
this.Name = "未命名";
this.Age = 0;
}
public People(string name)
{
this.Name = name;
}
public People(string name, int age)
{
this.Name = name;
this.Age = age;
}
}
}