I'm new to C# I came from a Java background, I'm trying to find a method to compare 2 strings if they are equal but to the ignore case. In Java you can type somthing like this
boolean equal = "abc".equalsIgnoreCase("ABC");
is there anything like that in C# ?. I know that I can use
var equal = String.Compare("abc", "ABC", StringComparison.OrdinalIgnoreCase);
or
var equal = String.Equals("abc", "ABC", StringComparison.InvariantCultureIgnoreCase);
I just want to know if there is anything shorter (without having to pass a StringComparison Enum )