using System.Collections.Generic; ListIn this example, we create a new ListmyStrings = new List { "apple", "banana", "orange" }; if (myStrings.Contains("banana")) { Console.WriteLine("The list contains the string \"banana\""); } else { Console.WriteLine("The list does not contain the string \"banana\""); }