Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# and VB in C#

Tags:

c#

vb.net

I have a c# and vb .net solution. I need to use the c# form inside vb form as a tab. How can I do this?

like image 635
Vicky Avatar asked Apr 12 '11 04:04

Vicky


2 Answers

You could create one of the forms in a separate class library or as a user control in a separate class library and just reference it from within your application. Each project in your solution can be either VB.Net or C#, so it works both ways...

In a simple example solution you could have the following projects

  • MyApp.CSharpControls - Project in C#
  • MyApp.VBControls - Project in Vb.Net
  • MyApp.UI - Project in either C# or VB.Net which can reference either of the other control projects

Edit
I'm presuming winforms??

like image 97
davidsleeps Avatar answered Oct 06 '22 20:10

davidsleeps


You would need to have Visual Studio Professional to do something like this.

Instead I suggest you use this site to convert your C#.net to VB.net http://www.developerfusion.com/tools/convert/csharp-to-vb/

like image 30
Craig White Avatar answered Oct 06 '22 20:10

Craig White