as the explanation above, you can mix C# and VB.Net code together by using the correct configuration. Mr. Dino Esposito's book Programming Microsoft ASP .Net 2.0 Core Reference describes this as well. BUt you have to have both VB.Net and C# compiler installed
for this to work.
the code in the app_code does get compiled on-the-fly. Actually, what happens is the code in the app_code get copied to a temporary folder, classes based on the aspx page combined with code behind gets generated and placed also in the temporary folder. Each
codes will be compiled by the appropriate compilers and then linked to each other and gets deployed to asp.net. You can see the generated code in the temporary folder. in my pc it is under C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
BUt you have to have both VB.Net and C# compiler installed for this to work.
with .NET framework how could you not have them both?
there are cases where we may not have C# and VB.Net compiler installed. the fact alone that we are developing on .Net Framework does not mean that we have those compiler installed. .Net Framework IS a framework afterall. It's a set of libraries where we
develop on. FOr instance, If you installed visual web developer express, the distribution DOES include VB.Net and C# compiler. but if you only installed visual C# express, then you wont have the VB.Net compiler, yet, you can still develop using .Net Framework
isn't it? With ASP.Net, given the proper settings, I think it is possible to develop on other languages, such as IronPython or IronRuby, maybe C Omega and F#. As long those languages have compiler that targets CLR anything goes. That's what language independence
there are cases where we may not have C# and VB.Net compiler installed. the fact alone that we are developing on .Net Framework does not mean that we have those compiler installed.
again, Microsoft .NET Framework contains a C# compiler (csc.exe) and a VB compiler (vbc.exe) you don't need to install the SDK or any IDE to have the compilers
Maybe compile one as a dll with a nice Interface(s) and use it in the other project through a reference? "
That would be the most likely thing to do. keeping both apart but talking to each other.
there are cases where we may not have C# and VB.Net compiler installed.
The base framework comes with both compilers. You don't need anything else, not even the SDK. Everybody who has the .Net Framework has both the VB and the C# compiler.
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.