I was about to write a method that has to decide whether or not to ignore case while comparing two strings.
public bool IsCaseSensitiveUsing(StringComparison comparer)
{
if (comparer == StringComparison.CurrentCulture |
comparer == StringComparison.InvariantCulture |
comparer == StringComparison.Ordinal))
return true;
return false;
}
Is there a better way to do it?