Ben
Ben

Reputation: 3

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 procedures.

Any help appreciated.

Thanks Ben

Upvotes: 0

Views: 570

Answers (1)

Darin Dimitrov
Darin Dimitrov

Reputation: 1038710

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")

Upvotes: 1

Related Questions