Calling C# code from VisualBasic

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

Guest

I'm developing an application for a PocketPC using VisualBasic.NET. I would
like to incorporate some code which is written in CSharp.NET. Is it possible
to call C# code from a VB application? What methods could I use to
accomplish this? Thanks in advance for everyone's help.
 
SkyRender said:
I'm developing an application for a PocketPC using VisualBasic.NET. I
would
like to incorporate some code which is written in CSharp.NET. Is it
possible
to call C# code from a VB application?

Yes it is.
What methods could I use to
accomplish this?

The simplest would be to compile the C# code as a DLL, and then just
reference it in your VB.NET application.
 
Thanks for the speedy response. I'm actually including a DLL in my C#
application. Would it cause problems if I compiled a project as a DLL if
that project included another DLL itself?
 
SkyRender said:
Thanks for the speedy response. I'm actually including a DLL in my C#
application. Would it cause problems if I compiled a project as a DLL if
that project included another DLL itself?

No - because it doesn't include a DLL, it just references it. Depending
on what the VB.NET application does, that may need to reference the
extra DLL too.
 
Back
Top