Listnumbers = new List { 1, 2, 3, 4, 5 };
bool containsEvenNumbers = numbers.Any(n => n % 2 == 0);
ListIn this case, the method will return true because the list contains the string "Mary". Overall, Microsoft.VisualStudio.TestTools.UnitTesting is a powerful package library for unit testing in C# that provides various methods to test different types of data.names = new List { "John", "Mary", "Peter" }; bool containsMary = names.Any(n => n == "Mary");