I have this class for Student
我有这个课程给学生
#region Person
public class Person
{
public string firstName { get; set; }
public string lastName { get; set; }
public string Address { get; set; }
public virtual void GetInfo()
{
Console.WriteLine("First Name: {0}", firstName);
Console.WriteLine("First Name: {0}", lastName);
Console.WriteLine("Address: {0}", Address);
}
}
#endregion
class
#region Student
public class Student : Person
{
public override void GetInfo()
{
// Calling the base class GetInfo method:
base.GetInfo();
}
public void TakeTest()
{
throw new NotImplementedException();
}
private List<Student> AllStudents = new List<Student>();
public Student()
{
AllStudents.Add(this);
}
public List<Student> AllStudentsList
{
get
{
return AllStudents;
}
set
{
AllStudents = value;
}
}
}
#endregion
#re