就像是一个C ++列表中的C#列表? [英] Is a C# list like a C++ list?

查看:168
本文介绍了就像是一个C ++列表中的C#列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想知道,如果一个C#列出就像是一个C ++清单。

Im just wondering if a C# List is like a C++ List.

在C ++中的大名单中取出一个元素是快速的,因为我知道的元素只是指向下一个。

Removing an element in the middle of a big list in C++ is fast because i know the elements are just pointing to the next.

因此,在大C#列表中取出一个元素时,是同在C ++中?或者是C#列表更像是一个C ++向量索引,因为你可以在C#列表中元素的索引号。

So when removing a element in the middle of a big C# list, is that the same as in C++? Or is the C# list more like a C++ vector with indexes because you can get the index number of the elements in the C# list.

推荐答案


  • C#列表< T> 类似于,并且具有相同的性能特点,如C ++ 矢量< T>

  • C#的LinkedList< T> 很是类似,并且具有相同的性能特点,如C ++ 列表< T>

  • C# List<T> is analogous to, and has the same performance characteristics, as C++ vector<T>.
  • C# LinkedList<T> is analagous to, and has the same performance characteristics, as C++ list<T>.
  • 的性能特点进行了详细讨论。在.NET文档的相关章节的言论部分: 列表< T> 的LinkedList< T>

    The performance characteristics are discussed in some detail in the remarks sections of the relevant sections of the .net documentation: List<T>, LinkedList<T>.

    这篇关于就像是一个C ++列表中的C#列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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