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

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.
Phil ChapmanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.


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.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.
Carl TawnSystems and Integration DeveloperCommented:
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.
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

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.
Carl TawnSystems and Integration DeveloperCommented:
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".
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".
Carl TawnSystems and Integration DeveloperCommented:
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.
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:
Phil ChapmanAuthor Commented:
Thanks fellows, you hve been verry helpful.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.