C# and VB.NET

  • Thread starter Thread starter yuen
  • Start date Start date
If the C# function is a class, you simply add the class to your VB project,
instantiate the class and use the function.

Regards

Niclas
 
Hi Yuen,

Could you add any details about what C# function you want to access? Is it
built-in or one of your own? etc.

Regards,
Fergus
 
It is a team project in my university. I need to extends project which have
been written by C# before.
The problem have been solved.
Really thank you!!
 
If they are already compiled as Class Libraries, then just add a reference
to your VB.NET Project. If they have yet to be created but will be written
in C#, then just include the project in your solution. Set the compile
order to match the precedence, and that's about it.
 
* "yuen said:
How can I call a C# function into VB.NET?

I assume that the function is implemented as a method of a class defined
in a C# Class Library. If you are using VB.NET Standard or VS.NET,
simply add a reference to the class library (see folder "References" in
the solution explorer). Then you can import the necessary namespaces
and use the classes and their methods.
 
Back
Top