Home Using OR in if condition with String value in C#.Net
Reply: 0

Using OR in if condition with String value in C#.Net

user657
1#
user657 Published in May 23, 2018, 4:50 pm

This question already has an answer here:

  • Operator || cannot be applied to type bool and string / string and string 4 answers

How can I put the below statement in C#.Net.

If(strValue =="ABC" || strValue =="EFG" || strValue =="IJK") Some code implementation.

It gives me error (Operand || cannot be applied to type bool or string) , when I use the above statement.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.310939 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO