Combobox selectedvalue
问题 I have a combobox on my form (winforms). In the properties I have set the DisplayMember and the ValueMember. DisplayMember = Name and ValueMember = ID. The Combobox is populated with the following objects: public class MyObj { public string Name { get; set; } public int ID { get; set; } } The Name displays fine in the dropdown(so DisplayMember is working) however, when I do: mycombobox.SelectedValue it is ALWAYS null. Does anyone know if I've forgotten to do anything? 回答1: Have you set the