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

C#.NET vs VB.NET 1

Status
Not open for further replies.

tbaguio

Programmer
Sep 25, 2000
41
CA
Hi,

I'm a self-taught VB6 novice programmer and was thinking of going back to basics. I am planning to take an introductory programming course but am torn between which language to use: C#.NET or VB.NET

I'm currently using Access 97 VBA at work, but want to get into more data-oriented application development (Desktop or Web-Based).

Which language would be more suitable for these goals? Also, I want to keep in mind future trends in programming.

Your input is appreciated.

Theresa "Sleep is the best meditation." - Dalai Lama
 
Either one would be the way to go. You would have to re-learn quite a bit of syntax going from VB6 to VB.Net anyways, so C# shouldn't be that much more difficult.

Personally, I like C# better. I do like the syntax of VB.Net better than VB6.

.Net seems more organized than VB6. I like how pretty much everything derives from the System class. If you need to do anything, you can pretty much figure a lot of it out by starting at the system class and going from there.

I'm surprised they are teaching .Net in introductory programming.
 
Theresa,

I'd learn VB.NET. The basics for all the languages are the same (the .NET framework) and it's bad enough learning this!!! But once you've got the framework sorted, you can relearn the syntax very quickly.

Craig
 
Thanks RiverGuy and Craig for your responses. I think I'll continue on and leverage my existing experience with VB and learn VB.NET. As for C#, I will delve into it slowly by trying an introductory book in the meantime.

I really want to learn C# based on what everyone is saying, but as Craig mentioned, it's important to get a strong root in the framework regardless of which language it is.

Thanks again. Now it's time to hit the books.... :(

Theresa

PS. Quite a few schools are teaching .NET in introductory programming classes nowadays. Microsoft seems to have made quite a few educational partnerships with many universities and colleges in my area (Toronto, Ontario, Canada). "Sleep is the best meditation." - Dalai Lama
 
I would suggest you learn C#. Why? Because of the marketability of the language. Let me see if I can explain this correctly...

If you learn C#, then learning Java would be very easy (all you need to know is the class libraries and a few minor differences). All that it would take to learn VB.NET would be things that you would most likely pick up in learning C# (by looking at examples). And, what happens when you see an example in C# and you don't fully understand the language? That could cost you some valuable time.

Whether or not you plan to learn Java is not the point. The point is that if you ever had the need to, then you could.

Here's another way to look at it: How much do VB developers make? How about C#? How about java? Now, what if you could take all three of these jobs and give them to one person? Wouldn't you pay this guy at least 1.5x what a person would get if they were only proficient in one of these languages? I would.

Of course, this all depends on the projects you work on :)

Hope my outlook on it helps a little. ________________________________________
Michael C Flanakin
Indigo Web Systems
michael.flanakin@indigows.com
 
I started out as a C based developer, but spent the last few years doing a majority of my work in Visual Basic. When .NET came out, I decided that it was best for me to start with something entirely different, C#. This way, I can develop in both .NET and 'Classic VB' and not get confused with any type of new and old VB syntax and coding rules.

Also, as ciddivine pointed out, C# is very similar to Java. If, in the future, you decide to switch over to Java development, then the learning curve is much more minimal down the line. Neil Konitzer
Freisoft
 
Here's another way to think about it: The more you know...the more marketable you are. And, all of that means more 0's in your paycheck. ________________________________________
Michael C Flanakin
Indigo Web Systems
michael.flanakin@indigows.com
 
Wow, you have all convinced me... C# it is. I guess I am sold on the marketability of learning C#. I never really thought of it that way. I was more stuck on keeping to what was familiar, but I figure I have to expand my programming realm anyway.

Thanks again!

"Sleep is the best meditation." - Dalai Lama
 
You are all missing the point.....

C# and VB are essentially the same thing....a way of accessing the .NET Framework.....it's the framework you need to learn.....the language is largely irrelevant.....learning VB.NET IS learning C#.....

Craig
 
Craig,

Possibly by learning C# instead, he has a better chance to pick up C++/Java, although the time saved if he wanted to learn one of those other languages would not be extremeley great.
 
Possibly, but you're increasing the time to learn .NET by mixing language and concept at the same time. If you learn concepts then the languages becomes vocabulary, mere words.

That's why people who learned Latin at school can learn (European) languages with comparative ease. They understand how language is produced, its form and function. They then apply those concepts to English, German, Spanish, French. The concepts stay the same, the vocab is the difference. Trying and learn vocab and concepts at the same time is very difficult.

Craig
 
And as a further point, I have no doubt that I would recommend C# to a new programmer or someone that didn't know VB. Then they must learn concept and language at the same time.........but may the lord help their soul!!!

Craig
 
Why take it in baby steps though? You learn C#, previously only knowing VB, by default, you know VB.Net as well. Why not just learn something completely new? I say if someone wants to learn an object-oriented language, then learn from one that was derived from existing OOP languages. Besides, most of the syntaxual differences between VB and C# would take less than a week to get used to.

 
Let me say this: There are still things that you can do in C# that you cannot do in VB.NET. C# is just a more powerful language and there is no way to deny or get around that. ________________________________________
Michael C Flanakin
Indigo Web Systems
michael.flanakin@indigows.com
 
That is utter rubbish.

VB.NET can do 99% of things that C# does. It's old prejudical nonsense of which you will never be convinced.....name something that I can't do in VB that I could in C#.....you'll be hard pushed.....

Craig
 
Actually, it takes me no time at all to come up with only a few of the reasons...

1. The ++ and -- operators (both before and after the var)

2. The ?: (if/then) inline operators to cut back on code

3. Multi-line comments (just nice to have all in itself, even tho it does not increase the functionality)

4. Pointers

5. Unsigned data types

6. No legacy standards or practices to compete with - the language started with a "clean slate"

C# just has more access to the .NET runtime environment than VB.NET does. There is no arguing that. And, in the same light, C# is a "stronger" language in the TRUE meaning of the phrase. For those of you who do not know, languages are sometimes measured by how many assembly language statements are used for the average high-order language statement. It is not an opinion, but a fact that C# is a stronger language in this scale. I admit, I do not have any numbers to back it up, but I'm sure if I felt the need to justify this plainly obvious fact, then I could find them.

Oh, and take note: I am a VB and ASP developer who started out with Basic. I am not expressing my opinions this way because I feel like I have strong ties to C#, I just think it is a stronger language. VB was made for those who could not fully grasp OO principles. This is why most VB developers are having problems when moving to .NET. You will find that a lot are opting for Delphi - which is an easier language than .NET...wait...scratch that, I don't think you can really call Delphi a "language."

Anyway, these are my opinions. ________________________________________
Michael C Flanakin
Indigo Web Systems
michael.flanakin@indigows.com
 
And just as equally, VB can do:

Jump out error handling
Optional parameters
etc.....

Now here's the crux of what i'm getting at, curteousy of Sam Gentile.......

"Forget about learning C#. Forget about learning VB.NET. Learn about the CLR and the BCL FIRST. That's the real .NET. The languages are just synatatic sugar. If you want 60% more verbosity, choose VB.NET. If you want the current media darling, choose C#. And if you're a real man (or woman) choose Managed C++-)). Only kidding. C# is a fine langauge.

But for gosh sakes, its not whats important. Its the System Libraries (the BCL) and the CLR that are important. Learn them, learn how and why .NET is doing the things its doing. Then you won't have to ask those kind of questions and you will really understand what's going on."

Craig
 
How about this for an idea:

I'm a VB programmer also doing the jump to .NET. My first thought is to do VB .NET (as VB is and always will be my first love ;-) and no I'm not knocking C# - in fact I'm getting pretty fond of it!). Then a friend with many more years in the business suggested to me that I learn C# and keep my VB 6 "pure" due to the major syntax changes.

That way, I keep my favourite language (which I'm mainly using for application development in my spare time) and I'm gettin to learn a fun new language primarily for my Web development. And as ciddivine said --- more 0's in my paycheck!

Craftor

:cool:
 
Hi Theresa,

I started doing VBA in Access years ago, and then gradually moved to VB6 and SQL. I bought a book on VB.NET thinking it would be the easiest path to learning .NET. For me, it was just confusing. VB.NET only has a superficial relationship to previous versions, and I found it difficult to make sense of. I picked up a couple books on C# recently, and I've already decided to switch. The underlying .NET stuff, which as others have said is the important part of .NET programming, just seem more clear when I dump the VB baggage and approach it as something new. And I've never made it past hello world with C or Java. I'm also not really a programmer. A lot of what I do is DBA and network admin stuff. I've heard VB programmers say they prefer VB.NET because of the familiar syntax though, so I think it's a pretty individual thing. I'd suggest trying a couple of small projects in each and seeing what feels best. I was really surprised to find that I could work faster in C#.

Glenn
 
Gowwwd I wish people would stop asking this question. Have they not heard of search engines? I think this is the most commonly asked dotnet question. foo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top