San569634

Hi

i have a windows application. I want class to written in VB.NET and form in C#.NET.

I just want to know how is that possible

How to compile project with different languages used in Windows Forms

thanx in advance




Re: Common Language Runtime how to compile application with 2 languages??????????

Kahu

Create the VB.NET class as a library (DLL) and then include it in your C# application. If you are using Visual Studio you can create two projects within your solution, one for the VB.NET library and one for the C# app:

  • First create a new C# Windows Application solution - this gives you a solution with a single project.
  • Now right click the solution name in the Solution Explorer and select "Add:New Project..."
  • For this project select VB and Class Library
  • Now right click the Resources entry of the C# project in the Solution Explorer and select "Add Reference". In the resulting dialog select the Projects tab and pick your VB class library.

That's it. Now building the solution will build both the C# and VB code, and executing it will run the C# code using the VB library.

HTH





Re: Common Language Runtime how to compile application with 2 languages??????????

San

Hi

thanx 4 the reply.

But i have one more doubt. Is there any way to do that without using any dll

Like we can do in ASP.NET by creating different folders (each per language) and then setting

<compilation> tag in web.config .