Is there any Vector in C#???

  • Thread starter Thread starter Guest
  • Start date Start date
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,
 
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.
 
Back
Top