I have an Interface that is defined something along these lines:
Interface foo
{
int someProperty {get; set;}
Dictionary<string, object> Items;
}
The concrete class that implements this interface needs to be registered for COM Interop. Everything compiles and the assemblies seem to register OK, but then when trying to create the COM object (e.g. from PowerShell) I get an error.
This seems to be related to the generic Dictionary<> class that I'm using. So here is the question:
- Is it even possible to expose generic collections through COM Interop?
- If yes, then how is it done?
- If no, then what's the workaround?