.NET中的非通用集合是否过时? [英] Are non-generic collections in .NET obsolete?

查看:118
本文介绍了.NET中的非通用集合是否过时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

换句话说:

有一个很好的理由选择一个类型安全的集合(HashTable vs. Dictionary)他们仍然在那里只是为了兼容性?

Is there a good reason to choose a loosely-typed collection over a type-safe one (HashTable vs. Dictionary)? Are they still there only for compatibility?

据我所知,泛型集合不仅是类型安全的,但它们的性能更好。

As far as I understand, generic collections not only are type-safe, but their performance is better.

这是一篇有关此主题的综合文章:使用C#2.0对数据结构进行广泛的检查

Here's a comprehensive article on the topic: An Extensive Examination of Data Structures Using C# 2.0.

推荐答案

非泛型集合已过时,因此已从Silverlight和Live Mesh中使用的CoreCLR中删除。

The non-generic collections are so obsolete that they've been removed from the CoreCLR used in Silverlight and Live Mesh.

这篇关于.NET中的非通用集合是否过时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆