C# internal interface with internal implementation

前端 未结 6 721
南笙
南笙 2020-12-15 15:03

I\'ve struck upon something I don\'t really understand.

I have a project, where I have an interface that is internal. The class that implements that interface is als

6条回答
  •  鱼传尺愫
    2020-12-15 15:38

    Probably that your "Temp" class is public and IScanner is internal. This is the reason why you get this error. I consider this very annoying since your are forced to implement it explicitly you cannot specify them as abstract or virtual. For the virtual stuff, I was forced to do an implicit internal virtual implementation of the same API and then call the implicit version from the explicit one. Ugly.

提交回复
热议问题