Remove duplicates from combobox which is bind to dataset
问题 I have a xml file in my project. I am reading the file through the below code in to combobox cbProduct . The problem is that the cbProduct is displaying duplicate text values. How to make them distinct? I have gone through some links but there way of approach is not related to dataset. I implemented the below code: DataSet ds = new DataSet(); ds.ReadXml(@"..\..\stock.xml"); cbProduct.DataSource = ds.Tables[0]; cbProduct.DisplayMember = "productname"; optional : If you have time it will be