How to Load ID and Name parallely to One combo box at same time in C# .net [closed]
I want answer in C# language and .Net framework
var items =
new[]
{
new { Id = 1, Name = "Test1" },
new { Id = 2, Name = "Test2" },
};
comboBox1.DisplayMember = "Name";
comboBox1.ValueMember = "Id";
comboBox1.DataSource = items;
[Edited] Thanks to Homam for the pointing out redundant Item
.
精彩评论