c# - DictionaryBase 和 Dictionary<Tkey,Tvalue> 的区别

标签 c# .net collections

谁能告诉我 DictionaryBase 之间的区别和通用 Dictionary<TKey, TValue> , 除了 DictionaryBase是一个抽象类!它们都是强类型的,我在某处读到泛型类在性能上优于非泛型类,应该是首选,那么 DictionaryBase 的确切用途是什么?然后? 两个类几乎相同!

任何形式的帮助将不胜感激

谢谢

最佳答案

非泛型集合类型仍在 .NET 框架中的原因主要是为了向后兼容。通常,您应该尽可能使用通用集合类型。

关于c# - DictionaryBase 和 Dictionary<Tkey,Tvalue> 的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4614228/

相关文章:

C# lambda 幕后

.net - 另一个 "could not load file or assembly ... or one of its dependencies. The system cannot find the file specified"

c# - 具有两个键的对象集合

c# - 如何使用 C# 检查是否安装了 PowerShell

c# - 为什么 try/finally 而不是 "using"语句有助于避免竞争条件?

c# - NHibernate 可以在不使用批处理或 Criteria API 的情况下解决 N+1 的订单-> 客户关系吗?

c# - C# 和 .NET 中是否存在 Java URIResolver 概念?

java - 如何修复在 TreeSet 中使用的比较器

java - arrayList 和 Object 数组的不同类型的错误

c# - 表,SQL C# 通过在 datagridview 中选择一行将数据添加到 "FK table"