winform技巧—Dictionary绑定datagridview控件

Dictionary<K,V> dictionary=new Dictionary<K,V>() //声明泛型集合
BindingSource binding=new BindingSource();
binding.DataSource=this.a.Values;
dataGridView控件名.DataSource=binding;


 

你可能感兴趣的:(WinForm,Dictionary,binding)