PDA

Click to See Complete Forum and Search --> : Select Case


mendhak
Dec 13th, 2004, 12:55 AM
What is the equivalent of Select Case in C#?

Is there any reference where I can see the equivalents between vb.net and c#?

DeadEyes
Dec 13th, 2004, 02:58 AM
switch(num)
{
case 1:
//dostuff
break;
default:
//dostuff;
}


I'm not sure where you'd find comparitive examples, but I think msdn gives it's code samples in both languages.

mendhak
Dec 13th, 2004, 03:48 AM
Thanks, works great.

jhermiz
Dec 13th, 2004, 10:39 AM
Thanks, works great.
You no good for nothing incompetent peon you:

http://developerfusion.com/utilities/convertvbtocsharp.aspx

mendhak
Dec 14th, 2004, 03:36 AM
This doesn't tell me how to use the line continuation character... in VB.NET, we

can _
continue a line _
like _
this.

DeadEyes
Dec 14th, 2004, 05:01 AM
In vb seperate lines of code are indicated by a new line in c# it's a semi-colon.
vb:
this _
is _
a continuation

c#
this
is
a continuation;

mendhak
Dec 15th, 2004, 12:24 AM
Thank


you;