I need to check in string.Endswith(\"\") from any of the following operators: +,-,*,/
string.Endswith(\"\")
+,-,*,/
If I have 20 operators I don\'t want to use ||<
||<
Given the complete lack of context, would this solution that is worse than using an easy || operator be of use:
||
Boolean check = false; if (myString.EndsWith("+")) check = true; if (!check && myString.EndsWith("-")) check = true; if (!check && myString.EndsWith("/")) check = true; etc.