开发者

Implementing a C# interface in a VB class

开发者 https://www.devze.com 2023-01-22 15:27 出处:网络
I am working on a plugin architecture and after some reading I have settled on one. The host class will be implemented in C# as well as some of the plugins for that host. The issue I am having is that

I am working on a plugin architecture and after some reading I have settled on one. The host class will be implemented in C# as well as some of the plugins for that host. The issue I am having is that some of my team uses VB.net. So the question, is it possible to implement a C# (plugin)interface in VB, such that when it is dynamically loaded into the host program it will have the methods required by the interface.

The idea I am attempting in VB:

Imports PluginInterface 

Public Class Class1 Imp开发者_StackOverflow中文版lements IPlugin


End Class

Note: PluginInterface is the namespace that contains the C# IPlugin interface


Yes, you can absolutely implement an interface written in C# within VB.NET, and vice versa.

0

精彩评论

暂无评论...
验证码 换一张
取 消