/*
OrdinalIgnoreCase compares the character codes without cultural aspects.
This is good for exact comparisons, like login names, but not for sorting
strings with unusual characters like é or ö. This is also faster because there
are no extra rules to apply before comparing.
*/
string FirstString = "I love my country!";
string SecondString = "Love";
bool result = FirstString.Contains(SecondString, StringComparison.OrdinalIgnoreCase);
Console.WriteLine(result);
/*
InvariantCultureIgnoreCase uses comparison rules based on english, but without
any regional variations. This is good for a neutral comparison that still takes
into account some linguistic aspects.
*/
string FirstString = "I love my country!";
string SecondString = "Love";
bool result = FirstString.Contains(SecondString, StringComparison.InvariantCultureIgnoreCase);
Console.WriteLine(result);
// To test if the string paragraph contains the string word
culture.CompareInfo.IndexOf(paragraph, word, CompareOptions.IgnoreCase) >= 0