By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,285 Members | 1,659 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,285 IT Pros & Developers. It's quick & easy.

C# code within VB.NET and vice versa

P: n/a
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_
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Dino,

"Dino Buljubasic" <di**@noplacelikehome.com> schrieb:
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.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2

P: n/a
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
"Dino Buljubasic" <di**@noplacelikehome.com> wrote in message
news:q3********************************@4ax.com...
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_

Nov 21 '05 #3

P: n/a
"lgbjr" <lg***@nospam.com> schrieb:
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.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #4

P: n/a
Yes, I do that occassionally as well.

Thank you

On Tue, 27 Sep 2005 13:05:56 +0200, "Herfried K. Wagner [MVP]"
<hi***************@gmx.at> wrote:
"lgbjr" <lg***@nospam.com> schrieb:
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.


Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.