Community discussion forum

Select Case statement

This is a comment thread discussing Select Case statement
  • 10 years ago

    This thread is for discussions of Select Case statement.

  • Advertisement

    Simply the fastest line-level profiler for .NET ever

    “The low overhead means it has minimal impact on the execution of my program”
    Mark Everest, Development Team Leader, Renault F1 Team Ltd.

    Try out the new ANTS Profiler 4 for yourself. Download your 14-day trial now

  • 6 years ago

    If you put the Case Is statement first, will it run this message box and not look at the others?

  • 4 years ago

    This below code segment throws casting exception
    Select Case str1
               Case "SomeString" Or "NoString"
                   Response.Write("OK")
               Case "SmallString" And "BigString"
                   Response.Write("AND here")
           End Select


    Can you please explain the structure of Case statement in detail ?
    Thanx in Adv.

  • 4 years ago

    You want Case "SomeString", "NoString".

Post a reply

Enter your message below

Sign in or Join us (it's free).