473,396 Members | 2,151 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

C# code within VB.NET and vice versa

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
4 1123
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
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
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Stian Søiland | last post by:
all examples performed with: Python 2.3+ (#2, Aug 10 2003, 11:09:33) on linux2 (2, 3, 0, 'final', 1) This is a recursive import:
1
by: Dharmendra Singh | last post by:
Hi I'm using .Net(C#) and working on the form(Screen) which have text boxes for both arabic and english data to store. So i want to change the language at run time from arabic to english and...
19
by: Vinod | last post by:
Hi, I have got a peculiar requirement. I want to distinquish between the color codes. I have got two text fields and i will enter the color codes there. The first text field will have ...
4
by: Bhan | last post by:
I have written code inside a c file in C++ Style(NOTE: No objects are created by myself.I am just using singleton objects in my c file.Also used extern "c").I am able to compile,link and test. ...
1
by: Sparhawk | last post by:
Hi, my company is going to migrate a large VC++ application to .NET to make use of Windows Forms (the old class library is not updated any more). We are not planning to migrate the rest of the...
3
by: aaa | last post by:
I fail to see the connection between the code behind and the raw HTML of the ASPX page how do you get variables and functions to communicate with each other? I cannot get this to even fire:...
2
by: shyam | last post by:
I have a C++ COM based windows service which have more than 30k lines of code and which is stablized over years. We need to take the advantage of the ..NET framework for this project, especially...
27
by: Tom Cole | last post by:
I'm starting to do more quantity of javascript coding and thought this might be a good time to investigate code styling. I primarily develop in Java and currently use the code styling techniques...
1
by: Maric Michaud | last post by:
Le Tuesday 24 June 2008 07:08:46 swapna mudavath, vous avez écrit : This is not valid xml, there is no commas in attribute list in xml. You could try with minidom if your xml stream isn't too...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.