Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C# versus VB question 2

Status
Not open for further replies.

gregmosu

Programmer
Jul 8, 2002
117
0
0
US
Which language is the one to learn? Both are part of .NET.. and both look like they do relatively the same things. The only difference I see between the two is syntax. C# looks a lot like java, and VB looks pretty much like it always has. So which one of these will be more popular in the future..? basically I dont want to spend time learning VB if microsoft is going to be pushing C#. Any help on this would be greatly appreciated.
 
A couple of points:

1. The framework itself was written in C#.

2. A recent magazine survey showed that C# programmers make over $20,000 more a year than VB.NET programmers.

3. There are rumors that VB.NET isn't as stable as C#

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
Hi!

I think you should learn both of them. Why? Because some peculiarities give you real power of .NET and some dummy limitation sometimes highly disappoint.

For example C# don't have optional parameters (so you can't easily run MS Word as Com object but from VB.NET you could do it easy).

I use C# as main language and VB.NET if necessary to solve problem more easily.
 
Thanks guys.. I probably will end up learning both. I was hoping to learn one first though so I can get an MS cert. I should probably have told you a little about my background first. I started out as a C programmer in a Unix env. and then moved onto to Java in a Windows env... so naturally, when I look at the code, C# looks more inviting.
 
chiph,

I find your #2 hard to digest. I would imagine, that since .Net is still a new lanaguage....most of the programmers using that technology already worked there...or somewhere else. For example, an experience Java or C guy might learn C#, whereas a VB 6 guy might learn VB.Net. So the pay difference is probably coming from the overall experience level of the programmer in all languages. I have never seen a .Net job advertised that only wanted experience in just .Net. They all seem to want experience with languages that have been around longer as well.

I see VB.Net and C# as pretty much fraternal twins. J# is cool because you can code with Java libraries...although it is a little bit less RAD than C#.

I agree with learning both...or at least learn one and be familiar with the other.
 
I find your #2 hard to digest. I would imagine, that since .Net is still a new lanaguage....most of the programmers using that technology already worked there...or somewhere else.

It was in Visual Studio Magazine about 2-3 months ago. They didn't really have a solid explanation for the difference either, other than:

1. Many C# programmers transistioned from higher-paying C++ and Java jobs (like you said)

2. VB programmers are perceived (rightly or wrongly) as not having as high a skill level as C# programmers.

I would add:

3. C# programmers were likely to be early adopters, and have more experience with the technology.

I agree with learning both...or at least learn one and be familiar with the other.

Probably the best route. The main difference between the languages IMO are in variable declaration, conditional statements (need parenthesis in C# for your "if" statements) , and statement blocks (curly braces vs. Begin/End). The majority of the code will be making use of the framework, and that'll be the same for both languages.

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
The postings already up have covered the main topics, so here are some of the code level differences between the two:

C# has operator overloading, like C++; VB.Net doesn't.

C# allows "unsafe" code blocks with raw pointers (like C/C++ pointers); VB.Net doesn't

Late binding is easy in VB.Net, but must be done manually in C#.
 
All of as pointed some good things about this question. I would to vote for C# instead of VB on the .NET platform but the one about you can say &quot; Cannot do <this thing> like exists in C#, Java, VB ....&quot; is C++.NET. MS continues to develop C++.NET as long will develop C#.

-obislavu-


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top