int[] numbers = { 7, 11, 15, 9, 4, 2 }; bool result = numbers.AnyOf(x => x > 10); Console.WriteLine(result); // True
ListBased on the examples provided, it seems that `IsAnyOf` is not a standard C# method. It is possible that it is part of a custom library or package.groceryStore = new List { "apple", "banana", "orange", "pear" }; string[] fruits = { "pear", "kiwi", "strawberry" }; bool result = fruits.AnyOf(fruit => groceryStore.Contains(fruit)); Console.WriteLine(result); // True