public static void Main()
if (Contains(word, letter))
Console.WriteLine("The word contains the letter");
Console.WriteLine("The word does not contain the letter");
if (Contains(word2, letter2))
Console.WriteLine("The word contains the letter");
Console.WriteLine("The word does not contain the letter");
public static bool Contains(string word, string letter)
return word != null && word.Contains(letter, StringComparison.InvariantCultureIgnoreCase);