C linkage function cannot return C++ class - error resulting from the contents of my method
问题 I am exporting a method that can be called from unmanaged code, but the function itself lives in a managed c++ project. The following code results in a compiler error: error C2526: 'System::Collections::Generic::IEnumerator<T>::Current::get' : C linkage function cannot return C++ class 'System::Collections::Generic::KeyValuePair<TKey,TValue>' error C2526: 'System::Collections::Generic::Dictionary<TKey,TValue>::KeyCollection::GetEnumerator' : C linkage function cannot return C++ class 'System: