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.
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.
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.
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.
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, ;
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.
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.
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.