Is there any Vector in C#???

G

Guest

Hi group
I want to translate my program from C++ to C#, I used STL vector in my C++
program but I wonder what data type should I use when I want it to act like a
STL vector, but I don't want to use System.Array class!!!!!
Regards,
 
N

Nicholas Paldino [.NET/C# MVP]

Jefe,

If you are using .NET 1.1 and before, then you will have to use an
ArrayList class. Unfortunately, this doesn't give you type safety, and you
would have to create your own strongly typed collections as a result.

In .NET 2.0 and above, you would just use a List<T> to get the same
functionality as a vector.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top