📌  相关文章
📜  使用列表框 c# 中的选定项目填充 texbox - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:39.199000             🧑  作者: Mango

代码示例1
string selected = listBox1.SelectedItem.ToString();
            int id = int.Parse(selected.Split(' ')[0]); // we are using dictionary and spliting the item in listbox and as  spliting parametar we are using space
            Car cars = car[id];
            textBox1.Text = id.ToString();
            textBox2.Text = cars.manufacturer;
            textBox3.Text = cars.model;
            pictureBox1.ImageLocation = cars.picture;
//by iq18but18cm