If with or operator

Hi ,
Can Anyone help me
How to use 'If ’ with multiple conditions using OR operator.

Ex: if user_Choice = ‘c’ or ‘d’
The above condition is giving me compiler error.

Thank u.

1 Like

Hi @saritha

You can refer to this article.

cheers :smiley:

Happy learning :smiley:

2 Likes

@saritha

Try below condition.

     IF user_Choice.Tostring.Equals("c") OR user_Choice.Tostring.Equals("d")
5 Likes

Hi
Hope this expression would help you resolve this
The user might enter in upper or lower case
So
In IF condition

user_choice.ToString.ToUpper.Contains(“D”) OR user_choice.ToString.ToUpper.Contains(“E”)

Cheers @saritha

2 Likes

thank u lakshman

1 Like

thank u palaniyappan.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.