Items can be added to a Windows Forms combo box, list box, or checked list box in a variety of ways, because these controls can be bound to a variety of data sources. However,the simplest method no requires data binding.
To add items
1. by using the Add method of the ObjectCollection class. The collection is referenced using the Items property:
cboDatabase1.Items.Add("TableName1");
2. Insert the string or object at the desired point in the list with the Insert method:
cboDatabase1.Items.Insert(0,"TableName1");
3. Your case -> assign an entire array to the Items collection:
cboDatabase1.Items.AddRange(listDiff.ToArray());
List<string> listDiff = new List<string>();
if (!Utils.ComTable(livetables, testTables))
{
listDiff.Add(livetables.TableName);
}
cboDatabase1.Items.AddRange(listDiff.ToArray());