listbox如何绑定list集合的数据
List<info>per=newList<info>();privatevoidbutton1_Click(objectsender,EventArgse){infop...
List<info> per = new List<info>();
private void button1_Click(object sender, EventArgs e)
{
info person = new info();
person.name = textBox1.Text;
person.age = textBox2.Text;
person.score = textBox3.Text;
per.Add(person);
listBox1.DataSource = per;
}
显示的是类的名字,如何改 展开
private void button1_Click(object sender, EventArgs e)
{
info person = new info();
person.name = textBox1.Text;
person.age = textBox2.Text;
person.score = textBox3.Text;
per.Add(person);
listBox1.DataSource = per;
}
显示的是类的名字,如何改 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询