C# and VB.NET

  • Thread starter Thread starter ·½®¶«L
  • Start date Start date
·½®¶«L said:
How can I call a VB.NET function form C#?

One of the great things about the .NET platform is that when compiled, it is
language independent. With Visual Studio.NET C#, and VB.NET both compile to
IL code. The CLR runs the IL code, which cares neither if it's written in
VB.NET or c# or Managed C++, etc...

It's quite simple really, Add the compiled VB.NET assembly to your C#
projects references. Now you should be able to call and instantiate the
VB.NET objects and methods just like c# code. You can add this reference by
right clicking on the References folder in your c# project and select Add
Reference, then you can browse to the VB.NET assembly. The Namespace should
now be available from within your code, just like the .NET frameworks.

sean
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top