to compile from one language to other
Since Visual Studio.Net comprises of some languages including C#, VB, J# etc
I have heard that .Net has a common compiler i.e. A program of VB can be compiled in VC#.Net and so on. If it is true then it may also be possible that to convert a code of VC# into VB and vice versa
Please tell me the details
Q2. I can make an exe file in VB6 but I cannot figure out how this is done in VB.Net
Re: to compile from one language to other
Courtesy of JMC's signature.
C# to VB.net
http://www.developerfusion.co.uk/uti...sharptovb.aspx
VB to C#
http://www.developerfusion.co.uk/uti...btocsharp.aspx
2. Run your program the .exe is created and put in the bin diretory
Re: to compile from one language to other
You can convert code from one language to another with converters like those that NOV mentions, but the IDE will not do it for you and there is no actual "compiling" from one language to another. Every .NET project, regardless of the development language, gets compiled to Microsoft Intermediate Language. There is a seperate compiler for each development language but they all produce MSIL. Other companies have produced .NET compilers for their products too, including Borland Delphi. One you have a .NET assembly containing MSIL, it doesn't know or care what language it was originally developed in. You can disassemble that assembly into a development language, but it will not necessarily be the same code as was originally written. It will be whatever the disassembler considers to be the closest match to the MSIL. I believe that ildasm.exe, supplied by Microsoft, can at least produce VB and C# but I don't know about others.
Re: to compile from one language to other
Quote:
Originally Posted by nothingofvalue
Thanks Buddy
Re: to compile from one language to other
Can anyone plz tell me how the procedure of compiling from one language to other is done? Not code translation
Re: to compile from one language to other
You can't compile from one .NET language to another. Source code in one language is compiled to IL, not to another .NET language.
For conversion of source code, you can use converters (such as ours of course :wave: ).
Re: to compile from one language to other
Actually I mean that I am designing a VB application then add in it a C# form etc and the whole application works fine
Is it possible in .NET
Re: to compile from one language to other
If you'd said that in the first place...
All .NET projects compile to a .NET assembly, which contains MSIL. There is no link whatsoever to the language it was developed in. If you compile a VB.NET project to a DLL then you can reference that DLL in any .NET project, be it C#, VB.NET, J#, C++.NET, Delphi or whatever. You already do this all the time. The whole .NET Framework is written in C# and you reference those assemblies in VB.NET projects, etc. Just note that you cannot reference an application form another application. Only libraries, i.e. DLLs, can be referenced.