0
是否可以將字典值綁定到Windows Combobox
? 我只能找到WPF應用程序的解決方案好將窗口值綁定到Windows窗體中的Combox
Dictionary<object,object>ProductInfo = new Dictionary<object, object>();
foreach (var data in p)
{
ProductInfo.Add(data.PenType, data.PenColor);
Console.WriteLine("{0} {1}", data.PenType,data.PenColor);
}
解決它comboname.DataSource =新的BindingSource(ProductInfo,NULL); –