[.net] C# and std vectors

Started by
1 comment, last by Bob Janova 17 years, 6 months ago
Is there anything in C# or .Net that lets me dynamiclly allocate vectors like in the std library of C++? Thanks.
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the internet, we know this is not true." -- Professor Robert Silensky
Advertisement
Equivalents: The .Net 2.0 equivalent is "List<T>", .Net 1.x is "ArrayList".

If you have Visual Studio, you should check out the 'Object Browser' (CTRL+ALT+J) and browse the namespaces for a while to become familiar with what's available.

If you actually need a real std::vector you would probably find it easier to use C++/CLI.
The System.Collections namespace (and is it System.Collections.Generic in 2.0?) contains all the 'usual suspects' when it comes to dynamic data structures. The most direct comparator to std::vector, as mentioned already, is ArrayList or List<Whatever>.

This topic is closed to new replies.

Advertisement