VB.NET vs C#, round two

SCG starts off with his bias “Coming from a Java, PL/SQL and C background to .NET” and then dumps on VB.

“Often they reason that VB is more like English so it must be better. This would of course be true if computers spoke English”

I work in C# for a living but love VB.NET. Because computers underneath it all only has zero’s and ones your argument holds no water.

Coming from no background which looks easier from the following?

if (str == str1) || (str == str2)
or
if (str is str1) or (str is str2)

It is factual that VB is easier to understand, whoever would argue against that is just plain ridiculous. It is common for C# programmers to boast that their language is harder therefore they must be “smarter”. This is so common, you must have missed the million blogs and chatrooms.

But SCG shows his true colors and agrees with me in his next breath that C# has “become very popular with people who actually have a clue”

Ahh there’s the rub, those million + VB guys just don’t have a clue.

Give me a break dude…

John G, are you really a C# programmer. The first indication that you are not is the supposed C# code “if (str == str1) || (str == str2)” which would NOT compile.

Next we have this crazy comment: "Because computers underneath it all only has zero’s and ones your argument holds no water."
This holds absolutely no relevance in a language discussion and has nothing to do with my comment. What I said was that C was very close to machine code, which is what these ones and zeros represent by the way. Obviously on .NET the machine code is generally virtual machine code which can be JIT compiled. I really hate to use this silly analogy but processors speak binary as much as English speakers speak in single letters.

Then we get the comment "Ahh there’s the rub, those million + VB guys just don’t have a clue."
Yeah, although a generalisation, I think this is pretty much accurate, for the majority of cases. I’m sure there are some good VB.NET programmers out there but I have yet to meet one. I have also yet to meet one who will not blindly defend VB no matter what even when they really have no knowledge of anything else. Few of them even have a decent knowledge of VB.NET let alone anything else. I have yet to meet a VB.NET programmer who understands what an interface is for, what an astract class is, what a factory method is (or why you would use it), what constructor chaining is, why you encapsulate and basically most of the object oriented design ideology.

Why are C# programmers paid more? Because, in general, they are far better programmers.

SCG,
I recommend an e-Book for you SCG by Daniel Appleman titled “Visual Basic.Net or C#…Which to choose”. Most of my views expressed are in agreement with that e-book. And he goes into detail why C# programmers are paid more. Some details are out of date because he wrote this when VS2003 was current. Things have changed with 2005 with VB.

I am a C# programmer. We create applications that help mechanics in the military troubleshoot by creating an application called “p2Trace” which allows users to trace circuits, be it Power, Ground or Signal and the ability to zoom in to components quickly an easily, interface it with a relational database and make it interactive for the user.

The above code was just showing syntax difference bro, not meant to actually display a lengthy if statement. So relax…

I just think you are speaking in ignorance when you make that generalization you have concluded. Do I think that C (type) programmers are generally better than the VB ones. Well yes I do, but my point is I am not referring to VB6, I am talking about .NET.

There is nothing I can do in C# that I cannot do in VB.Net. Both are 97% the same with few exceptions. It boils down to preference more than anything.

I do think that VB.NET programmers should learn C# so they can demand more cash…Since they stigma is out there.

Sorry if I sounded dogmatic, opinions are you know are like a…holes.

John G

Just one more side note.

“I have yet to meet a VB.NET programmer who understands what an interface is for, what an astract class is, what a factory method is (or why you would use it), what constructor chaining is, why you encapsulate and basically most of the object oriented design ideology”

If I open any current book of VB 2005 they should and usually cover these things. For example, I am just speaking off the top of my head. “VB 2005 the .NET 2.0 platform” covers the topics you mentioned that I have on my desk in great detail.

So programmers who are learning Object-Oriented skills in VB.NET are just as current as C#.

so whether you prefer
if ((str == str1) || (str == str2))

over

if (str is str1) or (str is str2)

Just remember it is preference. One thing I should say.

I see here two major points out of this whole thread:

1- C# programmers get paid more. There’s a reason for that. Historically, C type programmers have been the hard-core “real” software engineers. While, VB programmers were not real and came from other discipline and just picked up programming on the side. This was especially true during the .com bust.

In the .com bust, anyone off the street from any other unrelated field thought they could program (no design or discipline) and they easiest way in to the fancy world of programming was VB. Therefore, two camps were created: The REAL authentic C type programmers and the wanna-be programmers of VB and its likes. This explains the well justified premium pay for C# programmers.

2- Looking at the syntax from a pure objective/engineering perspective, definitley C# or C type languages are SIMPLER and more efficient hands down. Any engineer from one look will tell you that.

So C, C++ then C# is the track of REAL programmers and BASIC, VB, VB.net is the track for wanna be programmers (don’t have a clue about well designed and architected software and object oriented discipline and design patterns. In ohter words, mostly pure code monkeys who just quickly put a program together that ends up costing multiple times to maintain and extend later).

I hope I didn’t offend the VB folks as I was purely realistic and objective.

The situation has changed, now VB.NET not that that VB6!
Personally I write a commercial software only on VB.NET.
One of these days one developer C# has imposed to me the dispute, also has lost for it …
He tried to prove superiority C#, but could not, because I could deny his each statement. he has admitted a result, that simply does not know syntactic opportunities VB.NET

I started writing code in C, then C++, then Visual C++, then VB, then C#, and Finally, VB.Net.

Although I do like and code in C and it’s many flavors, I still prefer VB.Net2005.

I think that one should use the right tool for the job and not get suckered into doing something just to ‘feel good’ about being a ‘C’ programmer. Big deal, truely C programmers are more pompous than anything. Besides, who programs in only one language? Baby wanna-be programmers like ‘CluePot’ would be my guess. Don’t mean to offend you CluelessPot but you are truely ignorant of the craft of software development; no matter what position you have conned your way into. Cheers! :slight_smile:

Back in the days when my mom still whipping my nose the programmers of those era are either c or cobol and others i no longer remember.
There was a time when keyboarding/dos/unix is the norm until they were rescued by the ease of windows and mouse.
There was a time when internet is only reserved for government and institutions for underground communication until they were exposed by .com boom.
I programmed in vb6 for 3 years until we got the shock its no longer supported and quietly made the switch to .net and now comes the big hit Visual Studio.I am now a certified web developer by choice.
Things are evolving everyday especially in IT sectors and getting the job done faster is currently the norm regardless of your language preference.Plain and simple!
Warning! every standalone application is expected to marry the web since internet is now more affordable and companies can easily reach millions of consumers worldwide.
I will give .net/asp a Thumb Up in this race.Mark my word cause they are already in high demand and am one of them and well paid too!
To some c++ that goes all the way to label all vb .net lazy? Watch out! because your coding era i believe is already obsolete and i can hardly recall the last time C++ course were listed in college brochure nor c# and all java crue will soon follow suite.
You just wait and watch Microsoft shine while you all lost in your world of old syntax jargons.
and about the vb.net compatibility issues? never mind cause .net has already dominate the internet and Mac is backing down and so will the others soon.

Delphi soon will dead. Borland has move Delphi to Codegear and the Delphi Magazine has closed. Borland will sell Delphi and focus on ALM business.

VBNet is more human language than C#. VB Net easy to understand and for make money.

Even C# Programmer is more paid but only 1 of 1000 companies need C# programmer. Most companies need VBNet programmer and VBNet application more price than C# because VNBet App has beauty interface!

C# App very diffucult to maintenance because diffcult and hard to find C# programmer. That’s why the FACT that most companies need VBNet Programmers.

hi
This article points to the “Differences Between Microsoft Visual Basic .NET and Microsoft Visual C# .NET” white paper.

http://support.microsoft.com/kb/308470

best regard
http://www.w3village.com

Dont forget C# offers unsafe code allowing programmers to use pointers! I’ve used this alot whilst performing image manipulation algorithms!

I am not really a programmer, more an asp.net web developer. Anyway i prefer vb.net because, the more understandable syntax. As others have mentioned there is actually no performance or any other difference in the end compiled product, so it is only a matter of preference.

Qoute:“Even C# Programmer is more paid but only 1 of 1000 companies need C# programmer. Most companies need VBNet programmer and VBNet application more price than C# because VNBet App has beauty interface!”

The situation is the other way around here in South Africa. Also a VB.NET coder can easily lose a VB.NET job opportunity to a C#.NET programmer.

They are two kinds of programmers, those who code in VB and those who program in any language. A C#.NET programmer is more likey to understand VB.NET more than the VB.NET programmer.

After reading all the comments on this page, and as a programmer for 25 years, I must add mine.

(1) Under the .NET platform, C# and VB applications execute at basically the same speed. If execution speed is noticeably different between an identical program written in C# or VB (barring hardware and network constraints, of course) then the programmer needs to review his/her code.

(2) Which spoken language is better? English, German, Japanese? They are all a form of communication between people, all effective.

(3) I program in C# and VB. I like them both for their individual strengths, and both are powerful development platforms. My educational background in college was primarily C based, but I do admire much of the simplicity of VB.

NET is more about NET, not the chosen language.

(4) When speaking to upper management types and end-users about a specific programming language and programming in general, and after their eyes glaze over with boredom, they only have one question. Will it do what I need it to do, will it do it quickly and correctly, and when will i get it?

Of all the professional people I know in different disciplines, programmers seem to be the most infantile and unprofessional in their attacks on each other for the tools they use to accomplish the same thing. I have never heard a carpenter debate with another over the type of tools he or she uses. I have only heard them remark on the finished product…the bottom line.

Vb is easy to use and gives too much liberty to programmers. While C# do not but still to program in a better manner and funny manner i like Strict city like JAVA.
No doubt abt that JAVA is the best.

pja wrote:
“I have never heard a carpenter debate with another over the type of tools he or she uses.”

Then you never talked to a carpenter at all.
Of course are the tools they use discussed, as in every profession, in nearly the same manner as here.
Such discussion is helpful to some degree, of course it often misleads, but i love the discussions - it opens your mind, when you see arguments of all sides.

For all those guys saying that they saw a lot of these at the end of the page }}}}}}
Just press CTRL+] and there…you now know which is which.

Newbies…

Minor Differences between the two. I’d recommend learning both. You never know what language you’re going to have to maintain or encounter.

Caveats:

When working with Optional Arguments in C# where you can’t just overload like you can if you build it from scratch and you have to use COM from legacy apps or apps with a COM interface you might want to use VB.Net instead of C#:
(see http://support.microsoft.com/kb/305814)

object m = Type.Missing;
object url = “http://www.microsoft.com”;
InternetExplorer ie = new InternetExplorer();
ie.Navigate2(ref url,ref m,ref m,ref m,ref m);
ie.Visible = true;

Not Too Bad but what if you wanted to use an Excel Function that has 29 optional arguments? This is an extreme case but optional arguments are common in the COM world. (just to illustrate a point forgive any syntax errors):

object m = Type.Missing;
object xl = new Excel.Application;
object rng = xl.Range(“A1:A10”);
double result;

result = xl.WorksheetFunction.Sum(ref rng, ref m, ref m, ref m, ref m, ref m, ref m, ref m, ref m, ref m, ref m, ref m, ref m, ref m, ref m, ref m, ref m, ref m, ref m, ref m, ref m ref m, ref m, ref m, ref m, ref m, ref m, ref m, ref m, ref m);

VB.Net

result = xl.worksheetFunction.Sum(ref rng)

SQL 2005 SSIS

SSIS script components and script tasks use VSA which uses VB.NET and Not C#. They provide the API if you prefer to build your own C# code to handle data transformations and/or database load tasks. You could also build your own assembly in C# and refer to it with a VB.NET wrapper.

Maybe this will change with the next version of SQL Server. By that time there will may alot of Script components/task with VSA (VB.Net) code out there to maintain or convert.

My meager 2 cents.

I started programming assembly in 4th grade. I am always amused by the argument that C is closer to machine language so therefore it is better.

If that is the case than all of you posers need to learn to program assembly.

In the end the syntax (i.e. language) you use does not matter as long as your code is clean and optimal. All code gets translated by a compiler so none are that close to machine.

I do agree with the “use what will get you the most respect and money” but there are a lot of VB developers that already deserve the respect/pay without having to learn another syntax.

I like to program in C#(personally, technically).
But as a s/w servicing company has many departments running projects in C, C++, Java, VB…So If a Programmer(C,C++,Java) is to be taken as C# developer position, hen it is easy to pick it up…but where as VB programmer can only go with his line…