Core/CafeLib.Core/Extensions/LinqExtensions.cs
/// <summary>
/// Some test whether any element matches the predicate.
/// </summary>
/// <typeparam name="T">collection item type</typeparam>
/// <param name="collection">collection of item type</param>
/// <param name="predicate">predicate function</param>
/// <returns>returns true if any item matches the predicate; false otherwise</returns>
Some test whether any element matches the predicate.
Some test whether any element matches the predicate .
public static bool Some<T>(this IEnumerable<T> collection, Func<T, int, bool> predicate)
        {
            var index = 0;
            return collection.Any(item => predicate.Invoke(item, index++));
        }
public static bool Some < T > ( this IEnumerable < T > collection , Func < T , int , bool > predicate ) { var index = 0 ; return collection . Any ( item => predicate . Invoke ( item , index ++ ) ) ; }
Some test whether any element matches the predicate.
Some test whether any element matches the predicate .
returns true if any item matches the predicate; false otherwise
returns true if any item matches the predicate ; false otherwise
IEnumerable<T>
this
predicate
Func<T, int, bool>
None
collection
collection of item type
collection of item type
typeparam
collection item type
collection item type