How to include a C# class in VB.net?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I have a C# class that I like to reference it from v

Dim dib As DibGraphicsBuffe

Where DibGraphicsBuffer is C# class. How would I use this class in my VB project

I tried to add this single C# class to by VB but still it doesn’t recognize the DibGraphicsBuffer class. What I am doing wrong

Thank
A
 
just add it as a reference , that is all you have to do

to access it you need to do an import on the reference after you added it's
reference.


if you had a c# class called "CreateGraphic.DLL" you would add a reference
to it in the projects references folder... then if it's namespace was
"Graphics" you would do this in your code file

Imports Graphics

that should get you access to that namespace in that dll



Al B. said:
Hi

I have a C# class that I like to reference it from vb

Dim dib As DibGraphicsBuffer

Where DibGraphicsBuffer is C# class. How would I use this class in my VB project?

I tried to add this single C# class to by VB but still it doesn't
recognize the DibGraphicsBuffer class. What I am doing wrong?
 
* "=?Utf-8?B?QWwgQi4=?= said:
I have a C# class that I like to reference it from vb

Dim dib As DibGraphicsBuffer

Where DibGraphicsBuffer is C# class. How would I use this class in my VB project?

Create a C# class library project, add it to your solution, set a
project reference, import the library's namespace and use the class...
 
Back
Top