.NET Questions (CLOSED)

Questions and Answers on any aspect of .NET. Now closed.

This discussion group is now closed.

Have a question about .NET development? Try stackoverflow.com, a worldwide community of great developers asking and answering questions 24 hours a day.

The archives of .NET Questions contain years of Q&A. Even older .NET Questions are still online, too.

VB.net vs C#

both compiled into MSIL, is there any reason to learn C# if you already know VB?
Friday, July 28, 2006
C# is a better resume stuffer.

You should know enough C# to be able to read it, so that you can use all the books, magazine articles, and web articles that use the C# language.

Conversely, C# developers should know enough VB.NET to read it for precisely the same reasons.
Chris Tavares Send private email
Friday, July 28, 2006
I think (but don't have data to support) that C# has a better reputation than VB.NET (because of the bias against VB in the past).  I think, for that reason, it is assoicated with more higher paying jobs than VB (again, no stats to support my perception).  I personally like C# a lot better also, so that might tint my viewpoint.  Also, I think the real question here is:  why aren't people using IronPython, dotLisp or Boo instead of both VB.NET and C#?
Joshua Volz Send private email
Friday, July 28, 2006
I personally like VB.NET better than C# because it just makes more sense to me. Its not that C# is more difficult to learn, it just seems more primative. Maybe that is because VB.Net is much more discriptive or maybe its just because I started in the VB arena.

Having said that, I must admit that companies have much more respect for C# developers in Georgia. Maybe this is different in other places. Also, I've noticed that the more indepth books tend to be written for C#.

I definately think that it will be good for you to learn both languages. Its makes you more marketable. This is what I'm doing currently. Its kinda strange when you start out because you end up comparing everything to the language you know best. To me its like being an orthodox boxer trying to learn how to fight south paw. Very wierd to do at first but definately worth the effort in the end.
BStrick Send private email
Friday, July 28, 2006
While it's rather silly to insist that one is better than the other--they both have their strengths and weaknesses--it's very good to know both.  In particular, knowing C# will help you read Java, and in most of the good OO books, the code is in Java.
Kyralessa Send private email
Friday, July 28, 2006
I can't stand VB.  If you learn C#, you have typically worked with any of the 'standard' languages of C, C++, Java, and then on the web, javascript.

For myself, Microsoft makes a mistake catering to VB developers with VB.NET.  I'd prefer just C#.NET and that is all. 

That all being said, when I was asked at a customer site to fix some VB.NET - it was easy to do because I know C# and the .NET framework.  But, the VB guys at that location, when I did a project in C#, acted as if I had created some highly complex app that couldn't figure out.  It was shocking.  As if VB developers are incapable of learning a language outside of VB. 

Most every VB developer I've worked with I have converted to C# within 2 weeks - all of them first complain, but all later thanked me for showing them it wasn't that hard first off, and career wise they all moved on to better paying jobs with more opportunities.

So, expand your horizon, learn C#  :)  It is the language of choice for .NET
C# Send private email
Friday, July 28, 2006
"Also, I think the real question here is:  why aren't people using IronPython, dotLisp or Boo instead of both VB.NET and C#?"

Very simple: None of these languages ship with the .NET SDK or with Visual Studio 2005.
Chris Nahr Send private email
Saturday, July 29, 2006
It doesn't hurt to learn it.  It's not a whole lot different then VB.NET, a good way to get familiar with it is to use one of the .NET decompilers, like Reflector, since it decompiles in both VB.NET and C#, and works better then most of the "converters" I've found on the internet. 

There's no logical difference between the languages, but many people are "embarrased" to use VB, so there tends to be more C# jobs and code out there.
Phil Send private email
Saturday, July 29, 2006

Do you think that shipping with the MS tools is that big of an advantage when a person starts to learn a new language?  After giving it some thought, I would have argued that the reason people don't use them is because they are more powerful (and more dangerous).  More power means that businesses are afraid of not being able to find someone for cheap who can work on their product, so they only hire VB.NET and C#. 

I think that programming language choice can give a real advantage to the company willing to hire very skilled people and to pay them well.  They get more done with less guys.  I read an article the other day making this point about hiring people to use Ruby on Rails, instead of paying Java developers.  [I can't find the link.] The article stated that they could projects done faster, with less guys, at a lower cost to the client.
Joshua Volz Send private email
Saturday, July 29, 2006
If you know vb 6.0 and you're moving to .net, the best reason to learn c# is so that you don't carry over VB 6.0 habits into .net.

VB .NET carries a lot of legacy functionality from VB 6.0 and if you continue to use that you will miss out on the "framework way" of coding.

Other than that, no, there is not a compelling reason to choose one over the other.
Eric Wise Send private email
Saturday, July 29, 2006
TripleDots, yes, as others pointed out understanding C# opens the door to lots of code you can learn from and perhaps reuse; and it's more in demand if you'd like to change jobs; and C# coders generally have more technical depth, which would help if you'd like to hire someone else to work on your code.

C# is an ECMA standard, for what that's worth.

C# is the center of language r&d at Microsoft.  C# 2 had new features including generics, partial classes, anonymous methods, and nullable types.  C# 3 is promised to add further features including implicit typing, lambda expressions with expression trees, and query expressions. 

Each of these language features was put in for a reason, and it's not just that they're cool.  Every one of those features is there to make it easier to write more powerful and more maintanable code, and to incorporate more advanced techniques from other languages such as Lisp.

The way things are going, by 2015, Lisp will still be around, but simply included in C#.  By 2015, VB enthusiasts will join Delphi enthusiasts for a cry in their beers over "if only..."

I think your question should be reversed.  Is there any reason other than simplicity and familiarity that a .Net developer should settle for VB rather than C#?
Saturday, July 29, 2006
What interests me about these discussions is that the VB .NET people tend to say "Let some people use C# if they want to; but personally, I prefer VB .NET."  Whereas the C# people tend to say, "VB .NET should be abolished, and _no one_ should use it; _everyone_ should switch to C#."

I never see anyone suggesting that C# should be thrown out and everyone should switch to VB .NET.  I wonder what it is about programming in VB .NET that makes people more open-minded...or, conversely, what it is about programming in C# that makes people so narrow-minded and zealous.
Kyralessa Send private email
Saturday, July 29, 2006
"the VB guys ... acted as if [the C# project I had created] was  some highly complex app that couldn't figure out...  As if VB developers are incapable of learning a language outside of VB. 

Or, as if VB were easier to learn than C#.

VB programmers tend to be pragmatic (I know I am). I care not a wit that my language of choice is NOT arcane. However, I suspect that there are plenty of programmers who would like a BARRIER TO ENTRY that a more difficult langugae provides.

I can't BELIEVE I got sucked into another vb vs c flamewar ;-)
Mr. Analogy {Shrinkwrap µISV since 1995} Send private email
Saturday, July 29, 2006
how about learning J# so i can go both way .Net and J2EE?
Saturday, July 29, 2006
It just doesn't matter. Maybe, in the bad ol' days of COM, there might've been a difference. But, then right now, everything's equal. Can you find one thing in C# that VB.NET can't do for professional apps? Like, anyone ever used Unsafe code for any professional apps?

Point is, if you like Semicolons, use C#. If you like case insensitive, use VB.NET...

For me, the only thing I like about C# is the coloring scheme in VS 05:D So, I just change the VB 05 coloring scheme to match that of C# coloring scheme:D
Yuvi Send private email
Sunday, July 30, 2006
I can't even really say that C# is harder to learn than VB.NET. Certain concepts seem to be handled in a very simple fashion with C#, some are handled simply in VB.Net. I think that, at the end of the day, if people are going to pay me more for using one language over the other then that is a good reason for me to learn it.

I would however like to understand why intelligent, rational hiring managers can't seem to understand that their is no difference. People seem to think that developers using VB.Net are not as good as those who use C#. I think that this reflects on the ignorance of that manager more than the intelligence level of the programmer. People need to remember that the language is just a tool. This would be like painters arguing over who is the better painter; someone who uses oil on canvas or someone who uses acryllic. Can you imagine...? Or what about the mechanic who thinks he's better because he uses craftsmen tools as opposed to Dewalt?

I don't think that one language is better than the other for connecting to a database, developing a web app or building win forms. But if servicing my clients means using the language of thier choice than so be it.
BStrick Send private email
Monday, July 31, 2006
You're assuming that those VB.NET programmers are all well-educated competent developers who could switch to C# at the drop of a hat.

The managers assume that those VB.NET programmers have been dragged kicking and screaming over from VB6, which is the only other language they know; that they have a tenuous grasp at best of OOP and any .NET features that differ from VB6; and that they are generally helpless without VS wizards and the Microsoft.VisualBasic namespace.

Code monkeyism is unfortunately rampant in the VB realm; that's how the language got its bad reputation in the first place...
Chris Nahr Send private email
Monday, July 31, 2006
My experience says if you are taking VB6 programmer to .NET make them learn C# not VB.NET. Why? So they don't take any of the VB6 bad habits along with them.

Also I have talked to many clients that "think" C# generates faster code, they actually asked me why an application was done in VB.NET (I had to tell them thier predicessor asked for it in VB.NET) since C# is so much faster. Perception wins over the facts every time.

I would learn both. So you can tailor a resume for a position based on what they are looking for......
Monday, July 31, 2006
Yuvi: "Can you find one thing in C# that VB.NET can't do for professional apps?"

Anonymous delegates.  I can live without them, but prefer not to.  I hope VB.NET includes them soon, as I do have VB.NET projects from time to time.
Jason Pettys Send private email
Monday, July 31, 2006
>>hy aren't people using IronPython<<

because it's not released yet, is it?
I'll definitely check it out when it's released.
Hope it saves me some typing.
Fritz Send private email
Tuesday, August 01, 2006
> both compiled into MSIL, is there any reason to learn C# if you already know VB?

You hit the nail on the head. Abso-fucking-lutely. Both compile to MSIL. Why have a bias for one over another. After all, programmers have to consume MSIL at the end of the day.

Sorry, couldn't resist.
Sathyaish Chakravarthy Send private email
Tuesday, August 01, 2006
one feature that C# doesn't have is My keyword for fast access to common resource, i read it somewhere that Microsoft is positioing VB.net to rapid application development. i guess MS is trying to bring back the VB6 fan
Wednesday, August 02, 2006
I'v been a vb developer for over 15 years and have been using vb.net since its existance.  I would like to learn C# just to have the flexibiliy to jump back and forth depending on the client's requirements.  What is the quickest way to learn C#?  (Take a class, read a certain book, online tutorial, etc)
Brian Severson Send private email
Monday, August 07, 2006
I did VB for years, made my people use it for the first six months after hiring them, then I had to maintain a C# app.  At first I found it annoying and hard to read, but I realized that isn't a bad thing.

I find it is harder to read nested conditional/looping statemnents in c#

End If
End While
End Sub
etc. are a lot less ambigious than


which means you can stack an if inside a while inside a do inside another if and still easily keep track of where you are at.  C# would reduce such a thing to noise. 

Which is a good thing, as it forces me to write short, clean functions instead of the spaghetti I used to write.  I could write short, clean functions in VB.NET, but the syntax is so human friendly that I end up just getting sloppy. 

my $.02
brian Send private email
Wednesday, August 09, 2006
C# is a language specifically created for .Net. But VB.Net was a redesigned language for .Net. I would say rather, it was a marketing strategy of Microsoft to bring those VB, VC++, Java... developers to adopt .Net.

As far as performance are considered, both do not differ in any parameters. But those who know VB.Net will find it difficult to analyse codes written in any other OO language. But C# is almost a step brother of Java and C++.
Sharmin Jose Send private email
Wednesday, August 23, 2006

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz