VB.NET or C#.NET ???

K

Kevin Spencer

In addition, although this is not something that should be done very often,
it allows one to put multiple statements on the same line, and thus compact
your code a bit. There are a few situations where this comes in handy, such
as in switch statements.

switch (foo)
{
case (1): someFunction(); break;
case (2): SomeOtherFunction(); break;
//...
}

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
We got a sick zebra a hat,
you ultimate tuna.
 
C

Carlos J. Quintero [VB MVP]

Ignacio Machin ( .NET/ C# MVP ) said:
I would suggest the opposite, start with C# , it will be a slower start
but you will not "inherit" the bad habits you adquire using VBA , you
start freshly with a complete new set of concepts and way to write code.
I have seen a good amount of VERY BAD VB.NET code that scream it was
written by somebody who changed from VB6 to VB.NET in a similar way that
when they changed from VB5 to VB6

The bad habits are not attached to the language (at least most of them), but
to the programmer, and they will be carried to any new language. Even if
they are not bad habits but just ignorance, say, not using inheritance
because it did not exist in VBA/VB6, he will not be using it just because of
choosing C# and not VB.NET.

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com
 
H

Herfried K. Wagner [MVP]

Kevin,

Kevin Spencer said:
In addition, although this is not something that should be done very
often, it allows one to put multiple statements on the same line, and thus
compact your code a bit. There are a few situations where this comes in
handy, such as in switch statements.

switch (foo)
{
case (1): someFunction(); break;
case (2): SomeOtherFunction(); break;
//...
}

That's what VB.NET has the ':' for:

\\\
Bla() : Foo() : i = i + 12 : Goo(1, 2, 3)
///
 
K

Kevin Spencer

Darn, Herfried, it's been so long I forgot! I must be getting rusty with my
VB.Net!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
We got a sick zebra a hat,
you ultimate tuna.
 
H

Herfried K. Wagner [MVP]

Kevin Spencer said:
Darn, Herfried, it's been so long I forgot! I must be getting rusty with
my VB.Net!

No problem. Personally I do not like the ':' statement separator ;-).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top