Results 1 to 4 of 4

Thread: (Switch) case ranges

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2003
    Location
    Colorado
    Posts
    10

    (Switch) case ranges

    How can I add a range to my case statement.


    0 to 200

    Thanks,

  2. #2
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    Try this

    Case x >= 0 && x <= 200:

    I'm not sure if that'll work, but you can try.
    Dont gain the world and lose your soul

  3. #3
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    If C# stays with its ancestor here then it won't work. Use series of if...else if...
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  4. #4
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    yes, i dont think that's gonna work
    \m/\m/

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