List<int> numbers = new List<int> { 1, 5, 2, 7, 3 }; bool contains = numbers.Contains(5); Console.WriteLine(contains);