Visual Basic or Visual C#

Thread Starter

anhnha

Joined Apr 19, 2012
880
I am going to write some software for image processing, using RS232 port communications. Which language is better, Visual Basic or Visual C#?
Thanks.
 

tshuck

Joined Oct 18, 2012
3,527
C# is better in my opinion, I dislike interpreted languages when attempting processor intensive actions (e.g. image processing).(Edit: See below)

Plus, the many forms of BASIC are extremely limited in the scope of modern programming languages...
 
Last edited:

ScottWang

Joined Aug 23, 2012
6,817
Are you using mcu communicate with computer?
Are you using the 128x64 or 320x240 LCD to display the image with mcu?
 

ErnieM

Joined Apr 24, 2011
7,992
In their current "dot net" versions there is just a hair's breath of difference between the two as they share the same sets of underlying runtime routines.

I have always preferred VB for the speed and ease that forms (windows) may be constructed and used, though it is possible VC has caught up here.

Also, I don't think Basic has been an interpretive language since it got that V for visual.
 

tshuck

Joined Oct 18, 2012
3,527
In their current "dot net" versions there is just a hair's breath of difference between the two as they share the same sets of underlying runtime routines.

I have always preferred VB for the speed and ease that forms (windows) may be constructed and used, though it is possible VC has caught up here.

Also, I don't think Basic has been an interpretive language since it got that V for visual.
Visual Basic 6.0 was interpreted, but could be compiled.

Looking further, it does seem that there is not much of a difference between VB .NET and Visual C#, syntax aside. Both seem to do the interpreted to a point and compiled thing...
 

panic mode

Joined Oct 10, 2011
1,781
true but VB has more polished and smarter interface even if both are parts of same Visual Studio version.
 

MrSmoofy

Joined Jul 28, 2014
112
VB.NET and C# both compile down to MSIL so it doesn't matter which one you use really. It's more of what experience you have. For me coming from Basic, Cobol, Quick Basic, Delphi, Visual Basic it was easier for me to go to C# then to VB.NET never understood why I think it was more I couldn't use the VB syntax in C# so it forced me to learn better ways of doing thigns rather then sticking to old bad habbits using VB.

You will probably want C# though for image processing but that's just my preference.
 

vpoko

Joined Jan 5, 2012
267
C# is better in my opinion, I dislike interpreted languages when attempting processor intensive actions (e.g. image processing).

Plus, the many forms of BASIC are extremely limited in the scope of modern programming languages...
This is very incorrect. Both C# and VB.NET compile to an intermediate language similar to Java bytecode, and are then just-in-time compiled to native code when executed. Performance is identical for both (with the exception that only C# allows unsafe code, which may have a performance advantage, see my answer below).
 
Last edited:

vpoko

Joined Jan 5, 2012
267
The majority of differences between VB.NET and C# are syntactic. For example, VB.NET uses begin/end statements, while C# uses curly braces. The libraries, of course, are identical, and most features exist in both languages. That said, there are a few features in C# that are not available in VB.NET, most of all, unsafe pointers.

I would recommend C# primarily because it has much greater market share, meaning more people are programming in it, and consequently it's easier to get help, find examples, etc. Also, if you learn C#, it will be easier to parlay that into employment than VB.NET experience. However, since the similarities greatly outweigh the differences, once you learn one, it will be extremely trivial to learn the other.
 

vpoko

Joined Jan 5, 2012
267
true but VB has more polished and smarter interface even if both are parts of same Visual Studio version.
I'm not sure what you mean by that. The Visual Studio designers (e.g., the one for Windows Forms) are identical for both languages.
 

tshuck

Joined Oct 18, 2012
3,527
This is very incorrect. Both C# and VB.NET compile to an intermediate language similar to Java bytecode, and are then just-in-time compiled to native code when executed. Performance is identical for both (with the exception that only C# allows unsafe code, which may have a performance advantage, see my answer below).
Yes, please read my response to Ernie.
 

sirch2

Joined Jan 21, 2013
1,027
I've programmed commercially in both for years (decades in the case of VB) and the big difference is that C# encourages better programming practices and incorporates a lot of learning from the last few decades of language development. VB is still stuck with what feels like old and clunky syntax. I find it hard to see why anyone would start any new project in VB rather than C#, other than VB being the only language they know; but even then I would encourage the switch.
 

Thread Starter

anhnha

Joined Apr 19, 2012
880
Thank all for the replies!
I think I will choose C# because I know C and a little C++. BTW, many people seem to prefer C#.
Are you using mcu communicate with computer?
Are you using the 128x64 or 320x240 LCD to display the image with mcu?
Images are captured by camera and then it may be processed and transmitted to computer through RS232 to further process.
The camera will capture images of components and then these images will be analysed to see if there is an error or not.
I don't think that I need LCD with MCU here.
(actually, I am not sure)
 

Brownout

Joined Jan 10, 2012
2,364
Not to hijack, but we started out talking about Visual Basic and ended up talking about VB.net. What's the difference?
 

ErnieM

Joined Apr 24, 2011
7,992
Not to hijack, but we started out talking about Visual Basic and ended up talking about VB.net. What's the difference?
Absolutely no difference, as the "VB" in "VB.net" is an abbreviation for Visual Basic.

VB.net just happens to be the latest offering of VB from Microsoft.
 

vpoko

Joined Jan 5, 2012
267
Not to hijack, but we started out talking about Visual Basic and ended up talking about VB.net. What's the difference?
The last version of VB was VB6, many years ago. Microsoft then discontinued the product in favor of VB.NET, which is built on top of the .NET Framework. Like other products that got the .NET treatment (say, ADO vs. ADO.NET), the .NET version doesn't much resemble the one it's replacing; in this case, that's a good thing, since VB.NET is a powerful, full-featured, statically typed language. Code developed in any .NET language compiles to the same intermediate language, which is then run inside a virtual machine. As such, code written in any .NET language can make use of routines written in any other .NET language. The managed runtime (VM) also provides services like bounds checking, garbage collection, type safety, and exception handling. Some syntax and keywords have been carried over from VB to VB.NET, but they are much more different than they are similar (and way more different than VB.NET and C# are from each other).
 
Last edited:
Top