Is it possible to implement a COM interface with a .NET generics class?

前端 未结 1 748
被撕碎了的回忆
被撕碎了的回忆 2020-12-11 04:20

I have the following interface which I\'m trying to make COM-visible. When I try to generate the type-library it doesn\'t like the fact that my implementation class derives

相关标签:
1条回答
  • 2020-12-11 04:43

    Generic types and types that derive from a generic type cannot be exported. Set ComVisible(false) on your MyClass type. You'll need to either create a non-generic class implementation or use the interface only.

    0 讨论(0)
提交回复
热议问题