C# 集合之间的一般差异是什么?底层数据结构是什么?

发布于 2024-11-15 15:31:45 字数 146 浏览 5 评论 0原文

只是想简要概述一下 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

王权女流氓 2024-11-22 15:31:45

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文