C# 如何将列表放入组合框AddRange?
我有以下清单:C# 如何将列表放入组合框AddRange?,c#,list,combobox,C#,List,Combobox,我有以下清单: public static List<int> getData(OdbcConnection conn) { List<int> myData = new List<int>(); string myQuery = "some Sql text"; // ...............some other code return myData; } 我需要使用AddRange将列表中的参数添加到组合框中: th
public static List<int> getData(OdbcConnection conn)
{
List<int> myData = new List<int>();
string myQuery = "some Sql text";
// ...............some other code
return myData;
}
我需要使用AddRange将列表中的参数添加到组合框中:
this.comboBox1.Items.AddRange新对象[]{????????}
我应该怎么做?this.comboBox1.Items.AddRangegetDataconn.ToArray