ComboBox绑定List时可能会错, public class Person { public string Name; public int Age; public int Heigth; } 调用如下 List<Person> persons = new List<Person>(); persons.Add(new Person() {Age =12,Name = "asd",Heigth = 123}); persons.Add(new Person…
实现: 一.绑定数据库 点击查询按钮,comboBox显示从数据库查到的某字段的一列数据 方法:在按钮的点击事件绑定数据库 private void button1_Click(object sender, EventArgs e) { using (SQLiteConnection con = new SQLiteConnection(Constants.DATA_SOURCE)) { con.Open(); using (SQLiteCommand cmd = new SQLiteComma…