string input = "The quick brown fox jumps over the lazy dog."; string substring = "brown"; if (input.Contains(substring)) { Console.WriteLine("The string contains the substring."); } else { Console.WriteLine("The string does not contain the substring."); }