I have a class as below :

`class villages
 {
 public string name;
 public int pId;
 }`

I use it in my form like this :

```
private villages[] centerVillage=new villages[]{
        new villages{name= "village1",pId=0},
        new villages{name= "village2",pId=1},
        new villages{name= "village3",pId=2},
        new villages{name= "village4",pId=3},
        new villages{name= "village5",pId=4},
        new villages{name= "village6",pId=5},
        new villages{name= "village7",pId=6},
    };

```

Now I want to fill my `combobox1` from `villages[]` that its `DisplayMember=name` and `valueMember=pId`

I already tried this but does not work.

```
combobox1.DataSource = new BindingSource(centerVillage, null);
combobox1.DisplayMember = "name";
combobox1.ValueMember = "pId";

```