Using C # and VB.NET in one solution

I am busy with a small project to convert Access2003 DB to .NET. I am trying to integrate my functionality into an existing project that is used for some kind of administration. The code in this project is VB.net.

I started by creating my data access level, which seems to work fine. I can create new web pages that access the data I need. However, when I start using class files to configure my level of business logic, I cannot build my project using C # instead of VB. I don't like VB and like programming in C #, as I know that the syntax is much better, etc. Is it possible to program using C #, knowing that VB.NET was the language chosen to build the entire project?

If not, what will be the smartest way to integrate my module into a project using my favorite programming language? (Make a project and a link to the DLL?)

Edit: So, the next step in my question would be →

If I set up a new project as part of an existing solution, can I include this new project in my Layer + Data Access Layer business layer and a link from my existing one?

+6
c #
source share
2 answers

Yes, you can’t mix languages ​​within the same project, but you can add as many projects written in different languages ​​as you like to the same solution. (This is sometimes very useful, especially when it comes to the fact that in C ++ / CLI there are parts that can do things that could not be done in C # / VB.NET.)

+7
source share

Have a look at this related SO question:

  • Mixing C # and VB in the same project
+1
source share

All Articles