是否有可能从DLL导入的C#类在vb.net的dll?

是否有可能从DLL导入的C#类在vb.net的dll?

问题描述:


  • IDE:VS2010

  • Framework.net:4.0

我的Visual Studio 2010下创建一个C#DLL项目中,有几个公开课,我想用在另一个dll项目的类,但写在vb.net。

I created a c# dll project under Visual Studio 2010, with several public classes, and I would like to use its classes inside another dll project, but written in vb.net.

在vb.net dll项目,我引用内置C#DLL,但不可能导入C#类。 C#的DLL的命名空间,甚至无法识别。

In the vb.net dll project, I referenced the built c# dll, but impossible to import the c# classes. The namespace of the c# dll is even not recognized.

我必须做的看到我的C#类?
。如果这是可能的。

What must I do to see my c# classes? If this is possible.

类我的C#DLL(命名空间MyCSharpDll)的例子:

Example of class of my c# dll (namespace MyCSharpDll):

namespace MyCSharpNamespace {
  public class MyCSharpClass {
    public void Test() {}
  }
}

例如:

Imports MyCSharpDll.MyCSharpNamespace

VS2010指示错误说MyCSharpDll不明或无公共成员。

VS2010 indicates an error saying that MyCSharpDll is unknown or no public member.

感谢您。

我觉得你应该重写进口

进口MyCSharpNamespace

Imports MyCSharpNamespace

没有'MyCSharpDll的一部分

without 'MyCSharpDll' part