C# 集合之间的一般差异是什么?底层数据结构是什么?
只是想简要概述一下 C# 集合类型的差异,以及每种集合类型的底层数据结构是什么?
例如 string[]、ArrayList、Array、List 以及散列、集合等。
我知道链表、二叉树(一般而言),但有兴趣知道(在高层次上)每个都有什么优点等。
Just want a brief overview of the differences of c#'s collection types, and what would the underlying data structure be for each?
e.g. string[], ArrayList, Array, List, and hashes, sets, etc.
I know of linked lists, binary trees (in general), but would be interested to know (at a high level) what advantages each has etc.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
集合上的 MSDN 链接
MSDN link on collections
String[] 只是一个直字符串数组。 ArrayList 添加了 Add() 的功能,无需预先指定数组的大小,但失去了强类型功能。列表添加了强类型。哈希是一个键值对。这是一个开始。
String[] would just be a straight string array. ArrayList adds the ability to Add() without having a size for the array up front, but loses strong typing. List adds strong typing. A Hash is a key value pair. that si a start.