none
How do I write >= 95 and < 93 without getting an error on the "<" RRS feed

  • Question

  • I am getting a blue squiggly line under "<" symbol and it says "XML literal cannot appear here unless it is enclosed in parenthesis"   

    This how I wrote it: Case Is >= 95 and < 93

    • Moved by Bob Ding Wednesday, May 24, 2017 9:42 AM
    Tuesday, May 9, 2017 5:07 AM

All replies

  • I assume this is Visual Basic?

    The case statement is documented here. You should be able to comma separate several expressions e.g.

    Case Is >=95, Is < 93
    • Proposed as answer by Bob Ding Thursday, May 11, 2017 6:29 AM
    Tuesday, May 9, 2017 6:48 AM
  • Is it possible both >= 95 and < 93?
    Please think it again.

    • Edited by Ashidacchi Tuesday, May 9, 2017 6:50 AM
    Tuesday, May 9, 2017 6:50 AM
  • Is it possible both >= 95 and < 93?
    Please think it again.

    From documentation (bold-ness mine):

    If testexpression matches any Case expressionlist clause, the statements following that Case statement run up to the next CaseCase Else, or End Select statement.

    Although I agree that reversing the test and checking for a match on 93 or 94 or 95 could be simpler to read (possibly depending on context, though!


    • Edited by RJP1973 Tuesday, May 9, 2017 7:03 AM
    Tuesday, May 9, 2017 6:59 AM
  • You should ask VB questions here in VB Forum:

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vbgeneral


    Please Mark as Answered if this answers your question Or UnMark as Answered if it did not. Happy to Help :)

    Tuesday, May 9, 2017 7:55 AM