|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
CLR class correspondant to std::vector<> or CArray<>?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 What about System.Collection.Generic.List<T> ???
Show quote "Hyun-jik Bae" <imays_NOSPAM_@paran.com> wrote in message news:uvq0ORx3GHA.2596@TK2MSFTNGP06.phx.gbl... > 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. -- Show quoteHTH, Kevin Spencer Microsoft MVP Software Composer http://unclechutney.blogspot.com A watched clock never boils. "Hyun-jik Bae" <imays_NOSPAM_@paran.com> wrote in message news:uvq0ORx3GHA.2596@TK2MSFTNGP06.phx.gbl... > 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 > |
|||||||||||||||||||||||