+ 7
Why choose C# over VB.NET?
Why would I choose C# over VB.NET? I know that C# is more popular, but technically I don't see much of a difference. Or am I wrong? In that case, what are the advantages of C#?
11 Answers
+ 4
I once read an article (shameful I forgot to keep the link) that Microsoft is going to repeat its strategy on BASIC based language as it did in the past, that is to make it second class citizen in their neighborhood of languages.
Long story short, it was about updates and new features, where for C# it will be implemented immediately on patches and release, that may not be the case with VB, the article mentioned that C# will no longer be side-by-side equally in patches and features with VB.
Although the article didn't include any mention or saying from Microsoft's side, I guess I wouldn't be surprised if it should happen (again).
+ 9
Thanks for your nice sharing David! Totally agree with all the points listed here. đ
+ 4
Having done extensive development in both VB.NET and C# in the early 2000s, I can say that the technical differences are minimal and not enough to make one language better or worse than the other. That said, I cringe every time I have to look at VB syntax and twitch anytime I need to write it. However, this is more of an emotional reaction based purely on preference than anything technically tangible.
I dislike working with VB syntax so much, I won't even consider a VB.NET opportunity unless it was double a typical C# opportunity. Fortunately, VB.NET opportunities paying more than competing C# opportunities are rare. đ
The top reasons I dislike working with VB are:
1) VB is too verbose for my liking.
2) VB Syntax is awkward for me.
3) In the past, VB.NET developers were not known for writing good OOP code. This is because they came from a VB6 background, which was not an OOP language. Consequently, some of the worst code I've seen was in VB.NET applications I inherited for a very short time.
4) I once took a VB.NET opportunity that was 1.5 times higher than competing C# opportunities at the time. It was for a very large financial company with a lot of money to spend on new development. The team already decided on VB.NET before I joined. After 6 months, I felt like my very soul was being sucked out of me. (Okay... that was a little dramatic đ ) Fortunately, I left it for a C# job that paid even more. Lesson learned... money isn't the only factor to consider when taking a job. You have to be excited about the technologies you are working in.
+ 3
on visiting the Microsoft documentation msdn, we find the C# examples in the first place. so Microsoft promotes C# more than VB.net
+ 3
I think it's all about syntax taste. VB.net is for business analyst who firstly develop Excel macros on vba.
I used to work in Bank as a financial analyst. I developed a lot of macros to be more productive and build financial models. When I meet VB..net it's was amazing. Beyond the syntax, it's a real programming language and the Visual Studio support is superb
So, I think VB.net is a second class language for real programmers, but for power user it can be really useful to develop internal app
+ 2
There you might have a point: C# resembles C++, Java and some more languages, more than it resembles VB. Therefore maybe more spread..
+ 2
@Luka: I was looking for (technical) (dis-)advantages. Please explain why you think it's ugly...
+ 2
The links below do a really good job comparing these two languages:
- https://en.m.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Visual_Basic_.NET
- http://blog.jerrynixon.com/2014/01/choosing-between-visual-basic-and-c.html
- https://channel9.msdn.com/Forums/Coffeehouse/10187-C-or-VBNET-Which-would-you-use-and-why
- https://www.harding.edu/fmccown/vbnet_csharp_comparison.html
- 1
I'd use C# over VB.NET as it a lot more simple and complexity in the programs can lead to bugs and errors that are hard to be detected. There are programs that might help with it, like checkmarx, but it is important to try and keep things simple.