SyntaxFix
Write A Post
Hire A Developer
Questions
The code provided is correct, I don't see any reason why it wouldn't work. You could also try if (string1.Equals(string2)) as suggested.
if (string1.Equals(string2))
To do if (something OR something else), use ||:
if (something OR something else)
||
if (condition_1 || condition_2) { ... }