Im just wondering if a C# List is like a C++ List.
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.
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.
List<T>
is analogous to, and has the same performance characteristics, as C++ vector<T>
.LinkedList<T>
is analagous to, and has the same performance characteristics, as C++ list<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>
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With