[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

VB.NET or C#.NET for VB-C# Programmer

Posted on 2006-03-21
9
Medium Priority
?
291 Views
Last Modified: 2010-04-16
I have been writing GW Basic, Quick Basic, vb2 to vb6 Code for about 20 years.  On a scale from 1 to 10, I would put my VB6 technical abilities to be at about 8.  

I have not worked with .NET

I have an excellent repetition for getting good code out fast.

The company I work for is moving from being a VB shop to a C# shop.

I have been offered a full AppDev C# Developers Training Suite.

My Question Is
1.  What are the Advantages of C#.NET over VB.NET
2.  I understand they are a considerable difference in VB6 and VB.NET.  Since I have never worked in .NET before will the change from VB to C# be very dramatic.
0
Comment
Question by:Phil Chapman
  • 5
  • 3
9 Comments
 
LVL 12

Accepted Solution

by:
AGBrown earned 800 total points
ID: 16248803
You are opening up the "my language is better " pandora's box, good luck. There are many opinions on VB vs. C#. The most interesting article I have read on this is at:

and there are many many more (http://blogs.msdn.com/csharpfaq/archive/2004/03/11/87816.aspx for example).

IMHO: There is no real advantage to choosing one over the other. Having been a steadfast vbscript, vb6 coder for a long time, I have picked up C# with no problems. In the modern world of software design it is not the language that matters so much as your design abilities. Good software design works in any good language, and anything from Smalltalk to C, Java to C# to VB.NET (in no order of precedence or personal opinion) can be the best tool for a particular job if it matches your requirements.

So much of the choice about language should be what your team is best able to work with. It is no good insisting on VB as a .NET language if they were all java programmers, in that case C# would be a much better choice.

As far as VB6 vs. VB.NET 2.0 goes, it is completely different, far more powerful, and a long way removed from Visual Basic as it used to be. As far as c# vs. VB.NET goes, if you are being offered C#, take it. You are an advanced programmer and another modern language will help you a lot. Also, many of the things you learn in c# can be easily translated to VB.NET.

The change is not dramatic if you accept the fundamentals (case-sensitivity, braces, semicolons), just focus on the end-goal, getting your good code out fast.

Andy

PS OReilly do a nice little VB.NET to C# conversion pocket reference - maybe you should take one along to the course and learn two new languages at once.

0
 
LVL 12

Expert Comment

by:AGBrown
ID: 16248913
Apologies, I didn't include the "best article I have read" link, it is:
http://www.codeproject.com/dotnet/CSharpVersusVB.asp, and there is a follow up here http://www.codeproject.com/useritems/vbdefamation.asp. I think that demonstrates how touchy people can get over this one. As a programmer of both VB.NET and C#, I simply found the first one interesting, and not insulting, and like the rest of the un-peer reviewed web, to be taken with a liberal sprinkling of salt.

If you google for C# vs. VB.NET there are so many articles flying around its scary.
0
 
LVL 52

Assisted Solution

by:Carl Tawn
Carl Tawn earned 200 total points
ID: 16249287
Oooh goody another which is best discussion :o)

The biggest challenge you'll find is the move from VB6's quasi-OO to full blown OO in .Net.

I've personally used C/C++ and VB for a good few years, but have tended to stick mostly to C#, purely because I find the syntax to be less cluttered than in VB.Net. At the end of the day both languages will compile to the same MSIL, so its purely a matter of personal preference.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 12

Expert Comment

by:AGBrown
ID: 16249352
I'm sure I read an article (maybe on a blog) about the same piece of code in VB.NET and C# compiling to different MSIL - giving VB.NET the edge in performance for that obscure case. Can anyone post the link to it?

Its nice to hear someone else say there is no difference, carl_tawn, especially from a c/c++ background. At least there are some sensible people in the world.
0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 16249397
There were a couple of coding constructs in 1.1 that existed in C# but didn't have an equivalent in VB.Net, the "using" statement for one, but I think they are more or less the same in 2.0

Maybe "At the end of the day both languages will compile to the same MSIL" should be revised to "At the end of the day both languages will MOSTLY compile to the same MSIL".
0
 
LVL 12

Expert Comment

by:AGBrown
ID: 16249433
The using statement's equivalent in 1.1 was the Imports statement, wasn't it?

Or revised even further... "MOSTLY compile to the same MSIL except when your grandmother stepped on a spider on the first monday of the month".
0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 16249500
Maybe "using statement" wasn't quite the correct term. Essentially it allows you to do someting like:

    using( SqlConnection conn = new SqlConnection("ConnectionString"))
    {
         // Yada yada
    }

This construct essentially meant that Dispose() was called on "conn" as soon as it dropped out of the block.
0
 
LVL 12

Expert Comment

by:AGBrown
ID: 16249544
yes, I misunderstood. More differences include optional parameters in VB.NET (and VB6) method declarations, whereas in c# you use overloading of methods and chaining of constructors to achieve the same.

Results for comparing the languages syntactically:
http://www.harding.edu/USER/fmccown/WWW/vbnet_csharp_comparison.html
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vxgrfLanguageEquivalents.asp
0
 
LVL 2

Author Comment

by:Phil Chapman
ID: 16251846
Thanks fellows, you hve been verry helpful.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question