How to Access VB class from c# class which both Classes in App_code folder
-
Hi Experts, I am working on mixed language web project. In App_Code folder, Created 2 folders with names "VBCode", "CSCode". I added one class in VBCode folder with name "Class1.vb" and implemented 2 methods. And, I added one Class in CSCode folder with the name "Class2.cs". My Requirements is, I want to create object for class "Class1.vb" in my "Class2.cs". Is this Possible? if so, please give me the solution.
-
Hi Experts, I am working on mixed language web project. In App_Code folder, Created 2 folders with names "VBCode", "CSCode". I added one class in VBCode folder with name "Class1.vb" and implemented 2 methods. And, I added one Class in CSCode folder with the name "Class2.cs". My Requirements is, I want to create object for class "Class1.vb" in my "Class2.cs". Is this Possible? if so, please give me the solution.
HI, 1) you need to create one class library project for VB. 2) add your VBClass in that project. 3) build VB project and add DLL file into CSProject. 4) Add reference in your CSClass. 5) use VB functions :) Thanks -Amit.
-
HI, 1) you need to create one class library project for VB. 2) add your VBClass in that project. 3) build VB project and add DLL file into CSProject. 4) Add reference in your CSClass. 5) use VB functions :) Thanks -Amit.
Thanks for your reply. Other than this, is any other options?
-
Thanks for your reply. Other than this, is any other options?
No,as per my knowledge actually in single project you can not have multiple languages supported for now. do you have any problem creating different project ? thanks -amit
-
No,as per my knowledge actually in single project you can not have multiple languages supported for now. do you have any problem creating different project ? thanks -amit
No problem.. but, checking for any other alternative for this problem.
-
No problem.. but, checking for any other alternative for this problem.
if you like my solution please give rating thanks -amit.
-
Hi Experts, I am working on mixed language web project. In App_Code folder, Created 2 folders with names "VBCode", "CSCode". I added one class in VBCode folder with name "Class1.vb" and implemented 2 methods. And, I added one Class in CSCode folder with the name "Class2.cs". My Requirements is, I want to create object for class "Class1.vb" in my "Class2.cs". Is this Possible? if so, please give me the solution.
-
Hi Experts, I am working on mixed language web project. In App_Code folder, Created 2 folders with names "VBCode", "CSCode". I added one class in VBCode folder with name "Class1.vb" and implemented 2 methods. And, I added one Class in CSCode folder with the name "Class2.cs". My Requirements is, I want to create object for class "Class1.vb" in my "Class2.cs". Is this Possible? if so, please give me the solution.
I tried that years ago and it didn't work. Can't mix vb and csharp together in the same project. When you publish or run the project, the app_code folder gets compiled into a single or multiple dll's, not sure which but they don't mix. It's kind of like having webforms with a mixture of cs and vb code behind pages. You need to rewrite one of them if you want to keep them in the App_Code.