CLR class correspondant to std::vector<> or CArray<>?

  • Thread starter Thread starter Hyun-jik Bae
  • Start date Start date
H

Hyun-jik Bae

What is the CLR class correspondant to std::vector<> or CArray<>?
I looked for how to resize object[] (aka array<object> in C++/CLI), but I
cannot find it yet.
Please reply. Thanks in advance.

Hyun-jik Bae
 
The equivalent of an MFC Template is a Generic class. There is no equivalent
for std::vector<>, as arrays are declared by their individual types:

string[] strings = new string[1];
System.Data.DataTable[] tables;

There are generic static methods in the System.Array class that can be used
on arrays of any type, however.

As for the CArray<> Template, I would think that the equivalent would be
System.Collections.ObjectModel.Collection<T>. This is a generic Collection
which has basically the same functionality.

--
HTH,

Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com

A watched clock never boils.
 
Back
Top