[英]Implementing a C# interface in a VB class
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.
宿主类将在C#中实现,以及该主机的一些插件。 The issue I am having is that some of my team uses VB.net.
我遇到的问题是我的某些团队使用了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.
所以问题是,是否可以在VB中实现C#(插件)接口,这样当它动态加载到主机程序中时,它将具有接口所需的方法。
The idea I am attempting in VB: 我在VB中尝试的想法:
Imports PluginInterface
Public Class Class1 Implements IPlugin
End Class
Note: PluginInterface is the namespace that contains the C# IPlugin interface 注意:PluginInterface是包含C#IPlugin接口的名称空间
是的,您绝对可以在VB.NET中实现用C#编写的接口,反之亦然。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.