读 MS 源码笔记。

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

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

 

 

posted @ 2009-01-22 21:01  NewSea  阅读(268)  评论(0编辑  收藏  举报