I have this List:
public static List<int> getData(OdbcConnection conn)
{
List<int> myData = new List<int>();
string myQuery = "some Sql text";
// ...............some other code
return myData;
}
And I need to add parameters from the List to the comboBox with AddRange:
this.comboBox1.Items.AddRange( new object[] { ??????????? });
How should I make it?
this.comboBox1.Items.AddRange(getData(conn).ToArray());