Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use VB.NET and C# in the same application?

I am developing a GUI based application in MS Visual Studio 2005, I just want to know if it is possible to use both VB.NET and C# in the same project. Or can I include a module written in C# in my VB.NET project?

I have a class written in C# which I want to use in my VB.NET based project, so if I can include and call functions from that project than I won't have to write the class again in VB.NET.

So please help me as I am new to .NET programming.

like image 531
Amit Kumar Jha Avatar asked May 14 '09 11:05

Amit Kumar Jha


People also ask

Can I use .NET with C?

. NET Framework is an object oriented programming framework meant to be used with languages that it provides bindings for. Since C is not an object oriented language it wouldn't make sense to use it with the framework.

Should I use VB.NET or C#?

Even though there is less prominence of VB.NET community, but still we can say VB.NET is better than C#. 1. VB.NET uses implicit casting and makes it easier to code whereas in C# there are lot of casting and conversions needs to be done for the same lines of code.

Can I use VB.NET and C# in same project?

Answers. Hi, you cannot use C# and VB in the same project, but you can use C# projects and VB projects in the same solution. I would suggest breaking up the work into seperate projects, but ideally you would both use the same language which would make working on eachothers code a lot easier.

Is VB.NET C based?

It is pronounced as Visual Basic . NET, which is an updated feature and version of Classic Visual Basic 6.0. It is pronounced as "C SHARP" language, that belongs to the C family. It is also used to develop various applications running on the .


1 Answers

I just want to know that is it possible to use both VB and C# in the same project.

No, not in the same project. On the other hand, you can use them in the same solution.

Or can i include a module written in C# in my VB.net project.

I propose that you create a solution containing two projects: one in C# which forms a library that you use from your VB project. This is straightforward, easy to maintain and easy to extend.

like image 93
Konrad Rudolph Avatar answered Oct 20 '22 15:10

Konrad Rudolph