开发者

Calling C'# DLL from VB.Net

using VB.Net2010 I need to call a C# DLL

The problem I have is accessing the procedures inside the class The dll is referenced OK.

MYDLL is the namespace

which contains a public class Myclass

within MyClass are public procedures

sub New(MyString1 as string, MySTring2 as string)
   sub ProgramStart(myString as string)

All I can see is MYDLL.Myclass I can't see the procedures New and ProgramStart.

Viewing the references in the Object Browser I can see these proce开发者_Go百科dures.

Any help appreciated.

Thanks Ben


You need to create an instance of the object before being able to call instance methods:

Dim instance as MyClass = New MyClass("foo", "bar")
instance.ProgramStart("my string")
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜