Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using C# and VB.NET in one solution

Tags:

c#

vb.net

I'm busy on a small project to convert an Access2003 db to .NET. I am trying to integrate my functionality in an existing project that is being used for Administration of some kind. The code in this project is VB.net.

I started by setting up my Data Access Layer, which seems to work fine. I can make new web pages that access the data I need. However when I start to use class files to set up my Business Logic Layer I can't build my project when using C# instead of VB. I dislike VB and like to program in C# as I know the syntax a lot better, etc. Is it possible to program using C# knowing that VB.NET was the language chosen to build the entire project on?

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

Edit: So the next step in my question would be -->

If I set up a new project within the existing solution, can I make that new project contain my Business Logic Layer + Data Access Layer and reference from my existing one?

like image 305
Younes Avatar asked May 25 '10 09:05

Younes


People also ask

What is C in used for?

C programming language is a machine-independent programming language that is mainly used to create many types of applications and operating systems such as Windows, and other complicated programs such as the Oracle database, Git, Python interpreter, and games and is considered a programming foundation in the process of ...

How do I use C on my computer?

This means that once you write your C program, you must run it through a C compiler to turn your program into an executable that the computer can run (execute). The C program is the human-readable form, while the executable that comes out of the compiler is the machine-readable and executable form.

Why do people use C?

C is mostly used in creating popular compilers . Many programming language compilers are developed with reference from C. This is due to the association of C to low-level programming languages. This eases the language to be comprehensible to machines.

Is C still useful?

The C programming language has been alive and kicking since 1972, and it still reigns as one of the fundamental building blocks of our software-studded world.


1 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 having portions written in C++/CLI, which are able to do things which would be impossible to do in C#/VB.NET.)

like image 118
Dan Byström Avatar answered Oct 19 '22 07:10

Dan Byström