Results 1 to 7 of 7

Thread: Select Case

  1. #1

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Select Case

    What is the equivalent of Select Case in C#?

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

  2. #2
    Frenzied Member DeadEyes's Avatar
    Join Date
    Jul 2002
    Posts
    1,196

    Re: Select Case

    Code:
    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.

  3. #3

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Select Case

    Thanks, works great.

  4. #4
    Banned jhermiz's Avatar
    Join Date
    Jun 2002
    Location
    Antarctica
    Posts
    2,492

    Re: Select Case

    Quote Originally Posted by mendhak
    Thanks, works great.
    You no good for nothing incompetent peon you:

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

  5. #5

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Select Case

    This doesn't tell me how to use the line continuation character... in VB.NET, we

    can _
    continue a line _
    like _
    this.

  6. #6
    Frenzied Member DeadEyes's Avatar
    Join Date
    Jul 2002
    Posts
    1,196

    Re: Select Case

    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;

  7. #7

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Select Case

    Thank


    you;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width