|
-
Feb 16th, 2006, 12:12 AM
#1
Thread Starter
Hyperactive Member
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
-
Feb 16th, 2006, 12:16 AM
#2
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
"Imagination is more important than knowledge..."
Albert Einstein
-----------------------------------------------
If my reply helped you then you really were lost, but I still took the time to help, please rate it anyway
-
Feb 16th, 2006, 12:23 AM
#3
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.
-
Feb 16th, 2006, 12:26 AM
#4
Thread Starter
Hyperactive Member
Re: to compile from one language to other
 Originally Posted by nothingofvalue
Thanks Buddy
-
Feb 24th, 2006, 02:41 AM
#5
Thread Starter
Hyperactive Member
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
-
Feb 24th, 2006, 07:38 PM
#6
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 ).
-
Feb 24th, 2006, 09:58 PM
#7
Thread Starter
Hyperactive Member
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
-
Feb 24th, 2006, 10:19 PM
#8
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|