3

I have just started programming and have taken over someone else's work and they did everything in VB.Net.

How hard would it be to migrate away from VB.Net - all our pages are coded in VB but i'd like to learn C# and then move forward with that.

I use a Mac so it's seems easier for C# to work properly on a Mac

Jamie Taylor
  • 3,500
  • 21
  • 65
  • 99
  • @Grant Yes personally **I** think so too =) and a year ago I would've said the same thing, but a VB.NET guy who loves what he does could also say the same thing. Just my 2c. See http://blog.stackoverflow.com/2009/03/stack-overflow-and-bizspark/ (Quote : "Building cool stuff is way more important the brand of screwdriver you used to build it") =) – gideon Oct 29 '10 at 13:00
  • I am not sure why this was closed as subjective since it doesn't seem like a philosophical question so much as a practical one. Look at http://stackoverflow.com/questions/1278024/mixing-c-vb-in-the-same-project for example. Depending on the architecture (e.g. if it's good) of what you're working with, it could be very easy to build substantive new functionality using C#. – Jamie Treworgy Oct 29 '10 at 13:07
  • It was closed as before I edited it it was subjective but now i've edited it and made it not subjective I need to get it re-opened – Jamie Taylor Oct 29 '10 at 13:14
  • OK. Anyway, you could easily build new classes that play just fine with existing applications. As a practical matter, this might introduce a layer of complexity (especially since you say you're a novice programmer) that will be more trouble than it's worth. I'd just learn VB and use C# for new projects if you want. Everything you learn about the .NET framework will be applicable to both, anyway. – Jamie Treworgy Oct 29 '10 at 13:21

8 Answers8

3

It depends on waht you prefer. Many old VB people prefer VB.NET, many people coming from a Java / C background prefer C#. There ARE differences, but mostly minor ones.

TomTom
  • 61,059
  • 10
  • 88
  • 148
1

neither is better, as far as .net is concerned. c# has some features, vb.net has others. both compile into the same IL at the end of the day, so there is no speed difference. most sites have examples in both c#, and vb.net, so really, its apples or oranges. in your case, i'd argue that you should stick to vb.net, and keep all your codebase the same, which will be better for future people, on the other hand, if you do it in c#, you'll learn this, and also learn vb.net, since your existing code base is in it. its up to you.

jasper
  • 3,424
  • 1
  • 25
  • 46
1

I would recommend C#. Not because it's better in any tangible way, but because it's a superior skill to know in this business market. Knowing C# will qualify you for more jobs than VB.Net will. While VB was a huge technology in it's time, C# has taken the lead by leaps and bounds.

Those Java and C++ pundits who may frown upon .NET development as a whole will certainly appreciate someone's choice of C# over VB.Net. More importantly, so will recruiters and potential future employers. I also believe far more coding samples and solutions on the net these days are are in C#, making your life easier.

enforge
  • 915
  • 3
  • 10
  • 26
  • To answer your second question, it took me about a month to be competent with C# (when I switched from VB.NET) and about 6 months to be very fluent. I wouldn't worry about making the leap, it's the right move. Once you do, you will know both languages by default since you already know VB (and this VB.Net will be readable for you) – enforge Oct 29 '10 at 12:59
  • 1
    This assumes that he can use his personal benefits as the main deciding factor. That's often not possible in practice. – steinar Oct 29 '10 at 13:02
  • The way his original question was posed made it sounds as if it did not need to be a technical decision. He even said he wanted to do it in C#. So given the toss up, I figured the deciding factor would be which option is a better long term investment for him. Either way, I said "recommend" since at best it's an opinion :) – enforge Oct 29 '10 at 16:35
0

If you've already got past work that you can learn from that is in VB.NET, I would use that. Neither language is "better" per se, so go with the one you are most familiar with. The differences between the languages used to be much wider, but have been converging with each release.

Tim S. Van Haren
  • 8,861
  • 2
  • 30
  • 34
0

There are of course several considerations, though at the core, the two languages are just different aspects of the same thing, so neither is objectively better.

If others will be helping you to maintain the application in the future, in very general terms it is easier to find people interested in coding in C#. Also, if you take any open source addons, you will mostly find them in C#. The language won't preclude you using them together, since they compile to the same thing, but you'd have to deal with having part of your application in one language, and another part in another.

If this will be a solo act, since you've just started programming I would not recommend you take on the burden of migrating from VB.NET to C#. It almost always turns out to be nontrivial, and besides you can learn a lot from maintaining an existing application in VB.

Jason
  • 1,245
  • 10
  • 10
0

C# syntax is close to many other widely-used languages like Java or C++, thus it may be easier to handle them. I don't think you can say the same thing about VB.Net

hoang
  • 1,887
  • 1
  • 24
  • 34
0

A coded VB page is better than C# spec. You need a better reason for converting something that works than just being a 'better' language. If you are just starting the project, maybe or if it is an unworking pile of crap. And you want to throw learning a new language on top of this.

JeffO
  • 7,957
  • 3
  • 44
  • 53
0

This will always be subjective and it's just about impossible to give one answer to this, as so many factors play a role here. Both languages are pretty powerful altough there are a few things which one language has but the other hasn't. If this is a big project, you might want to take into account the number of developers available in your company or area with the necessary knowledge. Maybe it's easier to get developers for one language than it is for the other, but that probably depends on location. It might also be a deciding factor what language you or other developers want to use in the future. (I would go for C#, but that's just my personal opinion.)

Given that the application is already written in VB.NET, I would guess that it would pay off just continuing with using that. Note that you can write new libraries in C# although the main web project was still written in VB.NET.

steinar
  • 9,383
  • 1
  • 23
  • 37