I'm building a CLI/CPP layer to communicate between a native C++ library and a .Net (C#) client.
I have a map defined as the following in native C++
std::map<int, FooClass> aMap;
I assumed that to call C# from my CLI/CPP layer, I would use a Dictionary<int, SomeFooClass>
When I attempt to do so, I get the following error:
Cannot marshal 'parameter #1': Generic types cannot be marshaled.
What is the best strategy for marshaling a map<> from native C++ through a CLI/CPP layer to
be consumed by a .Net Client?