日期:2014-05-17 浏览次数:20848 次
public zhujiemian()
{
InitializeComponent();
List<students> stulist = new List<students>();
for (int i = 0; i < 3; i++)
{
students stu = new students();
stu.Age = i;
stu.Name = i + "haha";
stu.Sex = "男的";
stulist.Add(stu);
}
lvkecheng.ItemsSource = stulist;
}
public class students
{
private string name;
private int age;
private string sex;
public string Name
{
set { name = value; }
get { return name; }
}
public int Age
{
set { age = value; }
get { return age; }
}
public string Sex
{
set { sex = value; }
get { return Sex; }
}