What is the most efficient way to convert a std::vector<T> to a .NET List<U>?
问题 What is the most efficient way to convert a std::vector to a .NET List? To give some context, I am wrapping an unmanaged C++ class with C++/CLI. The C++/CLI class holds a pointer to the C++ class and I have a wrapper for each public method. One method returns a std::vector, so in my wrapper I was going to return the .NET class List. I.e. // unmanaged class class A { public: std::vector<int> runList(); } // managed class public ref class A { public: // the below is obviously extremely