class Student
{
string _name;
public string Name
{
get { return _name; }
set { _name = value; }
}
string _sex;
public string Sex
{
get { return _sex; }
set { _sex = value; }
}
}
List<Student> stus = new List<Student>();
Student stu=new Student();
stu.Sex="男";
stu.Name="张三";
stus.Add(stu);//这里添加10个学生就可以 |