How to call a Visual Basic function from .NET

Hello experts,

From .NET, I want to call a function from Visual Basic. How can I do this? Please help.

Thanks a lot,
codelearner
codelearnerAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
AlexFMConnect With a Mentor Commented:
If you want to call VB from managed code, you can do this exactly by the same way as from VB client. Add reference to VB Dll to the project, create VB class instance and call it's methods.
To call VB from unmmanaged C++ you need to implement COM client code. See #import precompiler directory.
0
 
Svetlin_PanayotovConnect With a Mentor Commented:
Or if your function is in VB (not VB.NET) you must export it as COM.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.