B
Bob Rosen
I have used VB.NET for several months. Just recently I was asked to modify
some web pages that were developed with C#. Although I know that C# is much
more popular, in comparing the two all of the advantages that I have come
across so far lie on the VB side (correct me if I'm wrong about any of
these; I'm still relatively new to C#):
1. VB supports named arguments (a significant readability advantage if used
properly), C# does not.
2. VB supports optional arguments, C# does not.
3. The C# "switch" statement requires you to explicitly jump out of each
case; if you don't, execution falls into the next case; this substantially
increases the risk of bugs. VB automatically exits its case statement after
executing the case (you can attach multiple conditions to each case.)
4. When you have a series of terminating braces in C#, it can be hard to
figure out exactly what constuct each brace is terminating. With VB, you
can at least say "end if", "end sub", etc., which makes it easier.
The one advantage I know about with C# is that it does a much better job at
getting you employed.
Can anyone come up with advantages of the C# language (compared with VB.NET)
that are inherent in the language? (Note: if you say "it lets me make the
code more compact", shame on you.)
Robert Rosen
some web pages that were developed with C#. Although I know that C# is much
more popular, in comparing the two all of the advantages that I have come
across so far lie on the VB side (correct me if I'm wrong about any of
these; I'm still relatively new to C#):
1. VB supports named arguments (a significant readability advantage if used
properly), C# does not.
2. VB supports optional arguments, C# does not.
3. The C# "switch" statement requires you to explicitly jump out of each
case; if you don't, execution falls into the next case; this substantially
increases the risk of bugs. VB automatically exits its case statement after
executing the case (you can attach multiple conditions to each case.)
4. When you have a series of terminating braces in C#, it can be hard to
figure out exactly what constuct each brace is terminating. With VB, you
can at least say "end if", "end sub", etc., which makes it easier.
The one advantage I know about with C# is that it does a much better job at
getting you employed.
Can anyone come up with advantages of the C# language (compared with VB.NET)
that are inherent in the language? (Note: if you say "it lets me make the
code more compact", shame on you.)
Robert Rosen