1。Dictionary<TKey,TValue> 是 KeyValuePair<TKey,TValue> 的集合 , 而 后者 具有 Key 和 Value 两个属性, 所以,在给数据源绑定的时候,可以指定绑定列为 "Key" , "Value"

2。反射的性能不好吧。 但是 MS 使用 反射很多。 其中 在绑定DropDownList 的时候,就用了 TypeDescriptor.GetProperties(container).Find(propName, true).GetValue(container) 来找到 容器的值的。

 

 

相关文章:

  • 2021-07-01
  • 2021-06-10
  • 2022-01-26
  • 2021-05-23
  • 2021-09-27
  • 2021-11-18
猜你喜欢
  • 2021-04-05
  • 2021-10-25
  • 2021-08-08
  • 2022-01-06
  • 2022-02-06
  • 2022-02-12
相关资源
相似解决方案