Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

In relation to C# and VB.NET, why would you choose one over the other?

Options
  • 05-04-2007 11:23am
    #1
    Closed Accounts Posts: 333 ✭✭


    Greetings

    Please note that this is not a college project, but instead it is a question from a web developer looking at learning new skills. I'm looking to see which of these languages I'll start to learn and why I should pick one over the other.

    What are the main differences between both languages or what's the advantage of using one over the other? From examples I have looked at online, there is an obvious syntax difference but because both of them sit on top of .NET, do they give the same performance? Is C# the Microsoft equivalent of C++. If so does it give the same low-level advantages?

    I ask this because I'm keeping an eye on the job market and am seeing a lot of jobs appearing that require C# skills.

    Cheers

    McGintyMcGoo


Comments

  • Closed Accounts Posts: 884 ✭✭✭NutJob


    The difference is Syntax of the language there both using the CLR in the same way.

    Why i chose c# over vb.net.
    I used vb5+vb6 and i don't like being reminded of the it. :D

    C# and C++ are very different beasts. It has C like language syntax but the benefits of Java.

    You can use un-managed code in c# but you have to be doing something unusual to have any reason to do so.


  • Registered Users Posts: 872 ✭✭✭grahamor


    I would agree with NutJob on choosing C#

    The C# syntax is much more like other languages e.g. C++, java, javascript etc so there is less of a learning curve. I was never mad about VB syntax

    If you are good at VB.NET then you would be considered for a C# job. Knowing about how the .NET framework works is more important i think and you can learn that from either language.

    Just dont choose J# !


  • Registered Users Posts: 15,443 ✭✭✭✭bonkey


    The only major difference between C# and VB.Net is that C# has been standardised (ECMA-334).

    While this means relatively little, it does make the C# language less prone to radical change going forward. VB.Net, on the other hand, can go wherever MS decide to take it.

    This was, at the time, the only real reason offered at a talk I attended at one of the TechEd conferences.

    I never bothered learning VB.Net, but from memory of what I've seen discussed, I think it is / can be slightly less strict than C# in terms of what the compiler will allow. Some see this as a good thing, some not.

    I would also say that if you learn C#, then both VB.Net and - to a slightly lesser extent - Java are very close neighbours. On the other hand, if you learn VB.Net, then Java would be considered (rightly or wrongly) to be slightly further away from your skillset. If flexibility and sped-to-adapt are important to you, C# could be a better choice from this perspective.

    To be honest, if you're a Web-dev looking to learn new skills, I'd look for whatever ties in best with the web-dev skills that you have. For my money. the Microsoft tech ties in with itself very nicely, but may be less easy to gel with other stuff than Java (J2EE) might be. This is particularly true when it comes to considering that (even allowing for Mono) Java is more platform-agnostic and seems to be more interested in working with everything, where MS want to get you onto Windows platforms, developing for IE. If you're doing ASP.Net, then sure...the choice is pretty-much VB.Net or C#. If not, then maybe consider that Java is a worthwhile third option to consider as a "back-end" set of skills to add to your web-dev.

    On a complete tangent...consider becoming a DB expert. Its a skillset I find is becoming more and more lacking. Thats fine when you're in certain situations, where all you want is to serve data from simple table-structures into your back-end OO design. But when you move to reporting etc. projects can easily find themselves seriously in need of someone who can write complex-but-efficient SQL statements, who also knows how to optimise the hell out of a relational design.


Advertisement