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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Should I learn C# or VB.NET?

Status
Not open for further replies.

MikeMCSD

MIS
Jul 12, 2002
107
0
0
US
Would it be better for me to learn C# or VB.NET?
I know VB6 and ASP now.
Is C# THE language to learn? Is it the future?
I know VB is easier to learn, but I'm thinking that
learning C# now will be better in the long run.
Any thoughts appreciated.
 
This is my advice:

Learn C#. You will get a new style syntax plus the .Net class libraries under your belt. Should you need to do something in VB.Net, it should be a straightforward transitition.

They are like the same languague though. They do the exact same things.
 
Ah.....the old debate......

You don't learn either. You learn how to program the .NET framework. Language is irrelevant. If you can code VB, you can code C#. The difference is syntactical sugar.

Craig

 
Yup.

The Framework is the challenge. Knowing one language or another is just a matter of different syntax.

Chip H.
 
This is what I know...
The company in which I work right know has the same question u have. So, they decided to hire a person who worked in microsoft to see which language will bring more benefits or advantages. The conclusion was that both languages VB.NET and C# were very similar(98% similar thanks to the .Net Framework) but C# has some little advantages and benefits over VB.NET. It seems is C# the best choice.
 
All depends which programming languages you know already...

If you are a hardcore C programmer or a java fan go for C#.

If you are a VB'er or come from a 4GL environment (my case) go for VB.NET.

Anyway, once you're up to speed, going from one language to the other is no problem.
You can even mix classes of different languages in your projects!

I stick with VB.NET and have even found a program which converts C# into VB.NET (lazy aren't I?)

Cheers,
phirst.
 
phirst,
what program is it that converts c# code into vb? I may have to do some reverse engineering, and that sounds pretty good. Thanks.
 
This from a former VB.NET user ~~

Learn C#

I have found things that I cannot describe with any other terms than "buggy behavior" with VB.NET. Specifically, dynamic controls and events are really sketchy with ASP.NET & VB. Sometimes events fire properly, and sometimes they don't. The same app coded in C# works perfectly every single time. That's my biggest gripe.

On a few other smaller notes, C# treats everything as a reference type. VB does not. Therefore, you have to remember how to treat different data types with respect to (among other things) NULL references and memberwise cloning. This is not the case in C#. It all acts the same, which is another big plus in my book.

Overloaded operators for types is another nicety that you don't get w/ VB.

C# is also a little harder to get sloppy with, whereas VB is much easier in that respect. Since beginning to code with C#, I have to think alot harder about typing, which is a very good thing. I've had fewer runtime errors out of my code ever since.

The syntax is just more elegant, IMHO, too. I like finishing a thought like this

;

Nice and clean. No need for the obligatory _
to complete a thought on another line like VB. Just keep on trucking until you're done, and when you are, ;

Just my two cents :);
penny1.gif
penny1.gif

The answer to getting answered -- faq855-2992
 
easy - Learn both.

Most people in the Windows development world will be using VB.NET, as Visual Basic 6 is now the most widely used language for programming for the Windows platform. You NEED VB in case you are forced to work on project teams and they work in VB. Learn C# because microsoft is pushing this language HARD. In most cases, a simple re-arrangement of the C# syntax converts a statement into VB. They are very similar and reference the same .NET libraries. A programmer should never limit themself to one language. Learn VB. Then learn C#. Then wait until Visual C++ version 7.1 comes out (late 2003) and then learn Visual C++ with MFCs (C# is a decent introduction to OOP C style programming). Version 7.1 of Visual C++ will feature a windows form designer not currently integrated with visual studio for VC++. In any event, VB.NET, C# and even managed C++ .NET all seem to perform the same with memory and speed if they were programmed alike. Once you know the .NET framework front and back, you will find yourself easily switching between these languages.
 
Hello,

All of the .NET languages compile into IL code. When analysing this IL code you will notice that the optimized level and thus performance level is slightly higher for C# than in VB.NET this is due to referencing and some other tid bits.
Although if you learn understand the framework conversion from one language to another is easily done and commonly implemented.
So in light, really any language is vaible. Though if you want a slight increase in performance for you solution, do you development in C#.NET.

Mike
 
Haven't we been here before?

Learn the .NET Framework. Lots of books come with examples in both VB and C#. Start with VB since you know it. You're using VB now so you won't "miss" any features going to VB.NET - in fact you'll gain a boatload.

Additionally, if you are reasonably object oriented you'll be able to reuse your objects if you move to C#. I still use quite a few controls that I wrote using VB in my C# code now. Otherwise you are trying to learn two things simultaneously. Everything you learn will be transferable if & when you move to C#.

So, IMHO, stick w/VB.NET & learn the framework. C# will come with time if you need it.

dino
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top