Method EqualsIgnoreCase
EqualsIgnoreCase(String, String)
Determines whether two
String instances have the same value based on a case-insensitive,
ordinal comparison.
Declaration
public static bool EqualsIgnoreCase(this string self, string other)
Parameters
Type |
Name |
Description |
String |
self |
The String instance to compare with another. Can be null / |
String |
other |
The String instance to compare with. Can be null . |
Returns
Type |
Description |
Boolean |
true , if both strings are equal ignoring case without taking the current culture into account.
|
EqualsIgnoreCase(String, String, Boolean)
Determines whether two
String instances have the same value based on a case-insensitive
comparison, optionally taking the current culture into account.
Declaration
public static bool EqualsIgnoreCase(this string self, string other, bool useCurrentCulture)
Parameters
Type |
Name |
Description |
String |
self |
The String instance to compare with another. Can be null / |
String |
other |
The String instance to compare with. Can be null . |
Boolean |
useCurrentCulture |
If set to true , the current culture will be taken into account, otherwise the strings are
compared ordinally.
|
Returns
Type |
Description |
Boolean |
true , if both strings are equal ignoring case w.r.t. the culture flag. |