How to delete object from combobox?

前端 未结 6 2006
遇见更好的自我
遇见更好的自我 2021-01-25 18:37

I have a combobox with objects of Foo type, here is the Foo class:

public class Foo
{
    public string name { get; set; }
    public s         


        
6条回答
  •  天命终不由人
    2021-01-25 18:48

    combox1.Remove(takes an object)
    Object selectedItem = comboBox1.SelectedItem;
    

    So you cna do it this way combox1.Remove(selectedItem);

提交回复
热议问题