advantage of VB.Net than C#.Net

jackbabington

New member
Joined
Apr 11, 2008
Messages
3
Programming Experience
Beginner
Hi there....

I am new in this community and I want to be part of it....

I am a beginner Vb.net programmer the same with C#.net...

my only question is:

what are the advantages of VB.net in C#.net????

thanks for any reply.....:)
 
There really aren't any, except if you have used visual basic before the syntax will be familar. Also, if you are new to programming the VB syntax is a little bit easier to pick up than the C# syntax.
 
Hi

Whats more important is learning the .NET Base class library, which learning either language will allow you to do. Once you have a grasp on the Base Class Library, transitioning from one .NET language to another will be no problem. VB.NET and C# both use the same base class library they just express it with a different syntax. Consequently learning one language will allow you to pick up the other a easily

Regards

ScottyB
 
i got to say... i agree with everyone when i say they're pretty much the same thing, like learning spanish or french - it's whatever floats your boat.

i used to love C# but then i tried vb.net and now using c# again, I have to say, personally i prefer vb.net.

And it's for basically one simple fact. The worst thing about c# is it is case sensitive - i dunno, whose idea that was. but it's stupid. It adds no extra benefit, you would never want to name a variable the same as an existing one anyway and I think intellisense works much better in VB.NET as a result.

there's a few other minor things i like about vb.net - mainly for convenience. such as the Handles <event> thing you can add to the end of a method (i think it makes things neater)

I also like the With syntax.
 
3 reasons why I prefer VB.Net over C# :
1) {} these things. I hate them. More specifically, when I'm in the 'flow' of programming, they're always so awkward to hit on the keyboard.

2) The case-sensitive thing. Just because you can, doesn't mean you should.

3) Declaration of variables in VB.Net read alot easier than C#. 'Dim x as integer' is alot easier to understand when glancing over code than 'int32 x'

I guess the first two could be summed up in the following statement : Any programming language that requires you to hit the shift key as much as C# does should be taken out back and shot.
 
;)Who should be shot? The young kitten at Microsoft...:eek:

If a computer game can be programmed in C#, than VB too:confused:
 
yes, if a computer game can be programmed in c# then it can be programmed in VB.Net too (or J# or C++.NET). They are essentially the same thing, just with different syntaxes. They both even compile to the same intermediary language, so there really shouldn't be performance differences either. What you're probably thinking of is C++ vs VB6. There is a vast difference between those languages, especially in performance, memory management, etc.

FWIW, I agree with the previous posters. I learned programming on C++ and Java. While great languages in their own right, I much prefer programming in VB (6 or .NET) for 98% of what I do. The biggest benefit to me, as was mentioned previously, is how it is case insensitive. This REALLY avoids a lot of stupid typos. And going beyond intellisense, you can do some quick self-checking of variables by following this convention:

a) always include at least 1 capital letter in your variable declaration
b) when using the variable outside of the declaration, always type the name in lower case.
If you spell it correctly, you will see your capital letters appear automatically when you go to the next line (assuming you're using Visual Studio). If they don't appear, then you have a typo.

I've never understood why other languages are case sensitive. Can you imagine how difficult it would be to read code if people actually took advantage of this when naming their variables? You'd have stuff like:
if (score > 10) {Score++;}
score = 0;

It might take slightly more typing, but I'd much rather try to debug something that looks like this:
If curScore > 10 Then totScore += 1
curScore = 0

Also, even though it's a few more keystrokes, it can actually be typed more quickly because you don't have to worry about hitting the shift-key so many times as was mentioned.

I also like the With statement. Just don't abuse it. As a personal rule, I only use it for setting/accessing a bunch of variables in a row with little to no control functions (If, For, While, calling internal functions, etc.) in between.
 
Back
Top