Reputation: 10807
Can i make obejct of a VB class from C# class, if possible then what i'll have to do?
Upvotes: 3
Views: 121
Reputation: 28259
1) Add reference to VB library you want to use.
2) Add namespace in your code.
3) Create your object and use it.
Upvotes: 3
Reputation: 74250
You can certainly use a class in a dll created in vb.net in a C# project. However you won't be able to do that natively inside Visual Studio for the same project.
Upvotes: 3
Reputation: 97671
Yes. You'll have to compile the VB class using the VB compiler first. The easiest way to do this is to have the C# code and the VB code in separate assemblies, in separate projects. You can then include the VB project as a reference in the C# project and use it that way.
Upvotes: 5