VB.Net- C# integration
-
I have a ASP.net application written in VB.Net which is the main application. I have another ASP.net application written in C#. I want to integrate the C# project files into the VB.net project ( without having to convert C# code to VB.net ) . The C# project contains few aspx pages and couple of C# utility classes. What would be the best way to integrate the C# files into VB.net project and run these successfully within the VB.net app? Thanks Madhuri Mittal
-
I have a ASP.net application written in VB.Net which is the main application. I have another ASP.net application written in C#. I want to integrate the C# project files into the VB.net project ( without having to convert C# code to VB.net ) . The C# project contains few aspx pages and couple of C# utility classes. What would be the best way to integrate the C# files into VB.net project and run these successfully within the VB.net app? Thanks Madhuri Mittal
The short answer is that you can't have C# files in a VB.NET project. I'd recommend either writing your C# into VB.NET for inclusion in the VB.NET proj, or componentise the C# code into a .dll that you can reference from the VB.NET proj. You could also expose the C# code as a webservice. It all depends on what the aspx C# files do. Cheers, Simon sig ::
"Don't try to be like Jackie. There is only one Jackie.... Study computers instead.", Jackie Chan on career choices.
article :: animation mechanics in SVG picture :: my first abstract photo -
The short answer is that you can't have C# files in a VB.NET project. I'd recommend either writing your C# into VB.NET for inclusion in the VB.NET proj, or componentise the C# code into a .dll that you can reference from the VB.NET proj. You could also expose the C# code as a webservice. It all depends on what the aspx C# files do. Cheers, Simon sig ::
"Don't try to be like Jackie. There is only one Jackie.... Study computers instead.", Jackie Chan on career choices.
article :: animation mechanics in SVG picture :: my first abstract photoSimonS wrote: The short answer is that you can't have C# files in a VB.NET project uhh, no. Actually you misread his question. No you can't have vb files in a windows or console application but YES you can inside a web application You just redirect the file pointer at the top of the aspx page, You can have many different files including java files in there. Although .net transforms it into J# and is utterly useless with J2EE at that point. Just go to add existing item and add the code behind. Then at the top of your asp page change the finlename it points to and thats all there is to it. nick I'm not an expert yet, but I play one at work. Yeah and here too.