class Person
{ --没有提供无参的构造函数
public Person(string name)
{
this.name = name;
}
private string name;
public string Name
{
get { return name; }
set { name = value; }
}
}
class Student:Person
{
public Student() { }
public Student(string name,string hobby)
{ --参数没有使用
}
private string hobby;
public string Hobby
{
get { return hobby; }
set { hobby = value; }
}
}