C# code within VB.NET and vice versa

  • Thread starter Thread starter Dino Buljubasic
  • Start date Start date
D

Dino Buljubasic

Is it possible to use C# code within VB.net or viceversa and if yes
why would one need to do somehting like this?

Also, what would be advantages of C# over VB.net and viceversa?

Thank you
_dino_
 
Dino,

Dino Buljubasic said:
Is it possible to use C# code within VB.net or viceversa and if yes
why would one need to do somehting like this?

For Windows Forms projects and Class Library projects: The language can be
chosen on per-project basis. For ASP.NET projects: Files written in
different languages can be mixed. It's not supported to mix VB.NET and C#
within one file.
Also, what would be advantages of C# over VB.net and viceversa?

This topic has been discussed many times in the public. I am sure you find
these discussions using Google Groups Search.
 
I agree with Herfried, but one point of clarification. If, for instance, you
have a class library (dll) project in C#, you can use the functions of this
DLL created in a C# project in a VB.NET project (just reference the DLL). I
do this quite frequently.

Cheers,
Lee
 
lgbjr said:
I agree with Herfried, but one point of clarification. If, for instance,
you have a class library (dll) project in C#, you can use the functions of
this DLL created in a C# project in a VB.NET project (just reference the
DLL). I do this quite frequently.

That's indeed right. You can even have projects of different programming
languages in the same solution.
 
Yes, I do that occassionally as well.

Thank you

That's indeed right. You can even have projects of different programming
languages in the same solution.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

C# to VB.NET 6
book recommendation request 0
Why program in C#? 35
Help with C# to VB.Net Conversion 6
Translate C# to VB.NET 21
asp/vb.net over vb.net app 7
calling C code from VB.NET 1
Merge VB.NET and C# 4

Back
Top