It's difficult to tell what is 开发者_开发问答being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form.
相关专题:
It's difficult to tell what is 开发者_开发问答being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
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.
精彩评论