• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

VB.NET or C#?

jread

Senior member
When one is programming in the Visual Studio IDE, does it really matter what language is used? My understanding is that the Common Language Runtime gives all the languages in Visual Studio virtually the same functionality, so it just comes down to what you are more comfortable with. I love VB.NET but I've found C# to be a bit irritating. To me, you can look at VB code, even if you've never seen it before, and figure out what it's doing. C# is much less intuitive. I guess it just depends on what background you come from... a C++ or Java person will probably go the C# route, while VB folks will go with VB.NET

Is there really any major advantage to using one or the other if you can accomplish the same things with them?
 
If you know C#, you're 90% of the way to knowing java, and halfway to knowing C++.
If you know VB.NET, you know VB.NET.

I learned languages with a C-type syntax first, and much prefer that over the VB style.

And I don't think VB is so much more intitive. WTF does "dim" mean? I still have know idea why you "dim" a new variable.
int x; # Create an integer called 'x'
dim x as integer; #WTF? I guess it makes sense if you know VB.

But you're right, it's mostly personal preference.
 
So what you're saying is that a C# programmer is more likely to be able to easily pick up other major languages?

Oh, and "Dim" stands for "Dimension". I also think it's stupid, lol.
 
I definitely prefer C#. I followed the C to C++ to Java to C# route, and I definitely feel more comfortable with C# than VB.NET. VB.NET seems to be somewhat counter-intuitive with certain statements. VB.NET also doesn't have much in common with plain old VB.. OO and all of the extra baggage (inheritance, polymorphism) are very different from old school VB.
 
Originally posted by: joshsquallVB.NET also doesn't have much in common with plain old VB

Yeah, I hear they kept the syntax similar as to not abandon all the older VB folks, but the language definitely gained a lot of power in the .NET environment. I guess that's why I wonder if there's any advantage as you can accomplish the same things with all the languages in the .NET environment.
 
I'm fairly sure that C# is a much more widely used language. A good background in C# (as opposed to VB.NET) could make it easier to find a job and to find resources when you encounter a code problem.
 
Originally posted by: joshsquall
I'm fairly sure that C# is a much more widely used language. A good background in C# (as opposed to VB.NET) could make it easier to find a job and to find resources when you encounter a code problem.

Very good point. It does seem that C# is much more popular in the corporate world.
 
VB.net is fine. Neither language has an advantage over the other as they both use the .Net Framework classes. The two languages have much more in common than they do differences. I have gone back and forth between the two on projects and feel comfortable with both.

I see more VB>net sample code out there than C#, but it is pretty close.
 
Both.

There?s so little difference between the two now that there?s no (good) excuse for not knowing both. The complexities of learning a language are seeded in the libraries. Since VB.NET and C# have that in common, the only difference is syntax.

That said, if you must decide on one (for instance, if this is your first language), I would learn C#. More and more shops are leaning that way, perhaps due to its syntactical elegance over VB. Similarly, C# shares is syntax roots with the likes of Java, C/C++, etc, so it will be easier to read those languages if you already know C#.
 
Originally posted by: notfred
If you know C#, you're 90% of the way to knowing java, and halfway to knowing C++.
If you know VB.NET, you know VB.NET.

I learned languages with a C-type syntax first, and much prefer that over the VB style.

And I don't think VB is so much more intitive. WTF does "dim" mean? I still have know idea why you "dim" a new variable.
int x; # Create an integer called 'x'
dim x as integer; #WTF? I guess it makes sense if you know VB.

But you're right, it's mostly personal preference.

QFT...

I was proficient at C++ and okay at Java. Now I only use .NET. 😉 It spoiled me as a programmer. Now I am just a code monkey.

But yes, mostly personal preference except that C# has a little more functionality. But for business processing (not big scale solutions) .NET programming doesn't really care what language you use.

For big, BIG scale solutions, why use .NET? C++ and Java solutions are so much more efficient.
 
I like C#, because I like its syntax. I don't like VB's syntax.

Originally posted by: notfred
If you know C#, you're 90% of the way to knowing java, and halfway to knowing C++.
If you know VB.NET, you know VB.NET.

Syntax isn't everything though, learning what does what in the standard class libraries is a huge part of learning a language. You can get by with the documentation, but you don't really "know" it if you have to constantly refer to a language reference.
 
Unfortunately I don't think VB.Net is a viable language any more. We use it here, but the problem is, microsoft seems to more and more treat it as a second class language. They used to release their app blocks and sample code in both languages, but this is becoming less and less common. If microsoft isn't going to treat vb.net with the proper respect, then it's kind of hard to justify using it. Their development lifecycle seems to be... make c# great and then do what we have time to do in vb.net. In 1.0/1.1 the perfect example was xml comments, where you ended up having to buy a 3rd party tool (or download a free one) to generate xml comments. In 2.0 it's nullable types, where c# has some additional operators that make them more viable, and in vb.net you have to write templated code which isn't as useful.
 
So what I'm gathering is that if there is any reason to use C# over VB, it's that C# is more supported and more widely-used these days.
 
Originally posted by: jread
So what I'm gathering is that if there is any reason to use C# over VB, it's that C# is more supported and more widely-used these days.

Pretty much. VB is overly verbose whereas C# is elegant and efficient. While VB may read on a more intuitive level for you now, you'll quickly find that C#'s syntax is just as recognizable (once you learn it) and even a time-saver. It will also set you up to transition to other languages quicker. Like we've said, if you know C#, you don't need to learn Java's syntax and you'll have very little to learn (as far as syntax goes) if you ever get into C/C++.

VB.NET exists only to help old school VB developers transition to .NET. Frankly, I'd prefer they stay away from .NET since 9/10 of them can't seem to learn proper OO practices and they bring their shoddy coding habbits with them when they make the transition, but that's another debate for another day 😉 .
 
Originally posted by: jread
So what I'm gathering is that if there is any reason to use C# over VB, it's that C# is more supported and more widely-used these days.

BINGO.

VB.NET has less respect because it is not the most rigid language for development. It is too lax in syntax.

But honestly, for most things, C# and VB.NET are the same.
 
I concur with the votes for C#. We are a VB.NET shop and we find that VB.NET is the bastard child of Microsoft - all their efforts are geared toward C#. It probably would never effect you, but VB.NET has a lot of bugs that cause problems for very large scale enterprises.

VB.NET is a solid platform, though, and there's really not any difference other than slight syntactical nuances. I come from a C++ background and absolutely hated VB6, so I can say with confidence and experience that VB.NET was an excellent transition of an old language into a new platform.
 
Back
Top