alexa
Syncfusion
menu Syncfusion

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class EnumerableExtensions

    Inheritance
    object
    EnumerableExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.Maui.DataSource.Extensions
    Assembly: Syncfusion.Maui.DataSource.dll
    Syntax
    public static class EnumerableExtensions

    Methods

    Average(IEnumerable<short>)

    Determines the average of values.

    Declaration
    public static double Average(this IEnumerable<short> source)
    Parameters
    Type Name Description
    IEnumerable<short> source

    Represents the queryable source.

    Returns
    Type Description
    double

    Returns the double value.

    Average(IEnumerable<short?>)

    Determines the average of values.

    Declaration
    public static double? Average(this IEnumerable<short?> source)
    Parameters
    Type Name Description
    IEnumerable<short?> source

    Represents the queryable source.

    Returns
    Type Description
    double?

    Returns the double value.

    Average<TSource>(IEnumerable<TSource>, Func<TSource, short>)

    Determines the average of values.

    Declaration
    public static double Average<TSource>(this IEnumerable<TSource> source, Func<TSource, short> selector)
    Parameters
    Type Name Description
    IEnumerable<TSource> source

    Represents the queryable source.

    Func<TSource, short> selector

    Represents the function expression.

    Returns
    Type Description
    double

    Returns the double value.

    Type Parameters
    Name Description
    TSource

    Represents the generic type parameter.

    Average<TSource>(IEnumerable<TSource>, Func<TSource, short?>)

    Determines the average of values.

    Declaration
    public static double? Average<TSource>(this IEnumerable<TSource> source, Func<TSource, short?> selector)
    Parameters
    Type Name Description
    IEnumerable<TSource> source

    Represents the queryable source.

    Func<TSource, short?> selector

    Represents the function expression.

    Returns
    Type Description
    double?

    Returns the double value.

    Type Parameters
    Name Description
    TSource

    Represents the generic type parameter.

    Average<TSource>(IQueryable<TSource>, Expression<Func<TSource, short>>)

    Determines the average of values.

    Declaration
    [RequiresUnreferencedCode("The Average is not trim compatible")]
    [RequiresDynamicCode("This method relies on dynamic code generation.")]
    public static double Average<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, short>> selector)
    Parameters
    Type Name Description
    IQueryable<TSource> source

    Represents the queryable source.

    Expression<Func<TSource, short>> selector

    Represents the function expression.

    Returns
    Type Description
    double

    Returns the double value.

    Type Parameters
    Name Description
    TSource

    Represents the generic type parameter.

    Average<TSource>(IQueryable<TSource>, Expression<Func<TSource, short?>>)

    Determines the average of values.

    Declaration
    [RequiresUnreferencedCode("The Average is not trim compatible")]
    [RequiresDynamicCode("This method relies on dynamic code generation.")]
    public static double? Average<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, short?>> selector)
    Parameters
    Type Name Description
    IQueryable<TSource> source

    Represents the queryable source.

    Expression<Func<TSource, short?>> selector

    Represents the function expression.

    Returns
    Type Description
    double?

    Returns the double value.

    Type Parameters
    Name Description
    TSource

    Represents the generic type parameter.

    GetElementType(IEnumerable)

    Gets the element type.

    Declaration
    [RequiresUnreferencedCode("The GetElementType is not trim compatible")]
    public static Type GetElementType(this IEnumerable source)
    Parameters
    Type Name Description
    IEnumerable source

    Represents the enumerable source.

    Returns
    Type Description
    Type

    Returns the source type.

    GetItemPropertyInfo(IEnumerable)

    Gets the property info.

    Declaration
    [RequiresUnreferencedCode("The GetItemPropertyInfo is not trim compatible")]
    public static PropertyInfo GetItemPropertyInfo(this IEnumerable list)
    Parameters
    Type Name Description
    IEnumerable list

    Represents the enumerable list.

    Returns
    Type Description
    PropertyInfo

    Returns the property info.

    Max(IEnumerable<short>)

    Gets the maximum value.

    Declaration
    public static short Max(this IEnumerable<short> source)
    Parameters
    Type Name Description
    IEnumerable<short> source

    Represents the queryable source.

    Returns
    Type Description
    short

    Returns the maximum value.

    Max(IEnumerable<short?>)

    Gets the maximum value.

    Declaration
    public static short? Max(this IEnumerable<short?> source)
    Parameters
    Type Name Description
    IEnumerable<short?> source

    Represents the queryable source.

    Returns
    Type Description
    short?

    Returns the maximum value.

    Max<TSource>(IEnumerable<TSource>, Func<TSource, short>)

    Gets the maximum value.

    Declaration
    public static short Max<TSource>(this IEnumerable<TSource> source, Func<TSource, short> selector)
    Parameters
    Type Name Description
    IEnumerable<TSource> source

    Represents the queryable source.

    Func<TSource, short> selector

    Represents the expression function.

    Returns
    Type Description
    short

    Returns the maximum value.

    Type Parameters
    Name Description
    TSource

    Represents the generic type parameter.

    Max<TSource>(IEnumerable<TSource>, Func<TSource, short?>)

    Gets the maximum value.

    Declaration
    public static short? Max<TSource>(this IEnumerable<TSource> source, Func<TSource, short?> selector)
    Parameters
    Type Name Description
    IEnumerable<TSource> source

    Represents the queryable source.

    Func<TSource, short?> selector

    Represents the expression function.

    Returns
    Type Description
    short?

    Returns the maximum value.

    Type Parameters
    Name Description
    TSource

    Represents the generic type parameter.

    Max<TSource>(IQueryable<TSource>, Expression<Func<TSource, short>>)

    Gets the maximum value.

    Declaration
    [RequiresUnreferencedCode("The Max is not trim compatible")]
    [RequiresDynamicCode("This method relies on dynamic code generation.")]
    public static short Max<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, short>> selector)
    Parameters
    Type Name Description
    IQueryable<TSource> source

    Represents the queryable source.

    Expression<Func<TSource, short>> selector

    Represents the expression function.

    Returns
    Type Description
    short

    Returns the maximum value.

    Type Parameters
    Name Description
    TSource

    Represents the generic type parameter.

    Max<TSource>(IQueryable<TSource>, Expression<Func<TSource, short?>>)

    Gets the maximum value.

    Declaration
    [RequiresUnreferencedCode("The Max is not trim compatible")]
    [RequiresDynamicCode("This method relies on dynamic code generation.")]
    public static short? Max<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, short?>> selector)
    Parameters
    Type Name Description
    IQueryable<TSource> source

    Represents the queryable source.

    Expression<Func<TSource, short?>> selector

    Represents the expression function.

    Returns
    Type Description
    short?

    Returns the maximum value.

    Type Parameters
    Name Description
    TSource

    Represents the generic type parameter.

    Min(IEnumerable<short>)

    Gets the minimum value.

    Declaration
    public static short Min(this IEnumerable<short> source)
    Parameters
    Type Name Description
    IEnumerable<short> source

    Represents the queryable source.

    Returns
    Type Description
    short

    Returns the minimum value.

    Min(IEnumerable<short?>)

    Gets the minimum value.

    Declaration
    public static short? Min(this IEnumerable<short?> source)
    Parameters
    Type Name Description
    IEnumerable<short?> source

    Represents the queryable source.

    Returns
    Type Description
    short?

    Returns the minimum value.

    Min<TSource>(IEnumerable<TSource>, Func<TSource, short>)

    Gets the minimum value.

    Declaration
    public static short Min<TSource>(this IEnumerable<TSource> source, Func<TSource, short> selector)
    Parameters
    Type Name Description
    IEnumerable<TSource> source

    Represents the queryable source.

    Func<TSource, short> selector

    Represents the expression function.

    Returns
    Type Description
    short

    Returns the minimum value.

    Type Parameters
    Name Description
    TSource

    Represents the generic type parameter.

    Min<TSource>(IEnumerable<TSource>, Func<TSource, short?>)

    Gets the minimum value.

    Declaration
    public static short? Min<TSource>(this IEnumerable<TSource> source, Func<TSource, short?> selector)
    Parameters
    Type Name Description
    IEnumerable<TSource> source

    Represents the queryable source.

    Func<TSource, short?> selector

    Represents the expression function.

    Returns
    Type Description
    short?

    Returns the minimum value.

    Type Parameters
    Name Description
    TSource

    Represents the generic type parameter.

    Min<TSource>(IQueryable<TSource>, Expression<Func<TSource, short>>)

    Gets the minimum value.

    Declaration
    [RequiresUnreferencedCode("The Min is not trim compatible")]
    [RequiresDynamicCode("This method relies on dynamic code generation.")]
    public static short Min<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, short>> selector)
    Parameters
    Type Name Description
    IQueryable<TSource> source

    Represents the queryable source.

    Expression<Func<TSource, short>> selector

    Represents the expression function.

    Returns
    Type Description
    short

    Returns the minimum value.

    Type Parameters
    Name Description
    TSource

    Represents the generic type parameter.

    Min<TSource>(IQueryable<TSource>, Expression<Func<TSource, short?>>)

    Gets the minimum value.

    Declaration
    [RequiresUnreferencedCode("The Min is not trim compatible")]
    [RequiresDynamicCode("This method relies on dynamic code generation.")]
    public static short? Min<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, short?>> selector)
    Parameters
    Type Name Description
    IQueryable<TSource> source

    Represents the queryable source.

    Expression<Func<TSource, short?>> selector

    Represents the expression function.

    Returns
    Type Description
    short?

    Returns the minimum value.

    Type Parameters
    Name Description
    TSource

    Represents the generic type parameter.

    OrderByDescending<T>(IEnumerable<T>, string, Func<string, object, object>)

    Gets the sorting order as descending.

    Declaration
    [RequiresUnreferencedCode("The OrderByDescending is not trim compatible")]
    public static IEnumerable<T> OrderByDescending<T>(this IEnumerable<T> entities, string propertyName, Func<string, object, object> getFunc)
    Parameters
    Type Name Description
    IEnumerable<T> entities

    Represents the collection entity.

    string propertyName

    Represents the property name.

    Func<string, object, object> getFunc

    Represents the function.

    Returns
    Type Description
    IEnumerable<T>

    Returns the enumerable collection.

    Type Parameters
    Name Description
    T

    Represents the generic type parameter.

    OrderByDescending<T>(IEnumerable<T>, string, Func<string, object, object>, IComparer<object>)

    Sorts the items in descending order.

    Declaration
    [RequiresUnreferencedCode("The OrderByDescending is not trim compatible")]
    public static IEnumerable<T> OrderByDescending<T>(this IEnumerable<T> entities, string propertyName, Func<string, object, object> getFunc, IComparer<object> comparer)
    Parameters
    Type Name Description
    IEnumerable<T> entities

    Represents the collection entity.

    string propertyName

    Represents the property name.

    Func<string, object, object> getFunc

    Represents the function.

    IComparer<object> comparer

    Represents the comparer.

    Returns
    Type Description
    IEnumerable<T>

    Returns the enumerable collection.

    Type Parameters
    Name Description
    T

    Represents the generic type parameter.

    OrderBy<T>(IEnumerable<T>, string, Func<string, object, object>)

    Gets the sorting order.

    Declaration
    [RequiresUnreferencedCode("The OrderBy is not trim compatible")]
    public static IEnumerable<T> OrderBy<T>(this IEnumerable<T> entities, string propertyName, Func<string, object, object> getFunc)
    Parameters
    Type Name Description
    IEnumerable<T> entities

    Represents the collection entity.

    string propertyName

    Represents the property name.

    Func<string, object, object> getFunc

    Represents the function.

    Returns
    Type Description
    IEnumerable<T>

    Returns the enumerable collection.

    Type Parameters
    Name Description
    T

    Represents the generic type parameter.

    OrderBy<T>(IEnumerable<T>, string, Func<string, object, object>, IComparer<object>)

    Gets the sorting order.

    Declaration
    [RequiresUnreferencedCode("The OrderBy is not trim compatible")]
    public static IEnumerable<T> OrderBy<T>(this IEnumerable<T> entities, string propertyName, Func<string, object, object> getFunc, IComparer<object> comparer)
    Parameters
    Type Name Description
    IEnumerable<T> entities

    Represents the collection entity.

    string propertyName

    Represents the property name.

    Func<string, object, object> getFunc

    Represents the function.

    IComparer<object> comparer

    Represents the comparer.

    Returns
    Type Description
    IEnumerable<T>

    Returns the enumerable collection.

    Type Parameters
    Name Description
    T

    Represents the generic type parameter.

    Sum(IEnumerable<short>)

    Determines the sum of values.

    Declaration
    public static short Sum(this IEnumerable<short> source)
    Parameters
    Type Name Description
    IEnumerable<short> source

    Represents the queryable source.

    Returns
    Type Description
    short

    Returns the sum value.

    Sum(IEnumerable<short?>)

    Determines the sum of values.

    Declaration
    public static short? Sum(this IEnumerable<short?> source)
    Parameters
    Type Name Description
    IEnumerable<short?> source

    Represents the queryable source.

    Returns
    Type Description
    short?

    Returns the sum value.

    Sum<TSource>(IEnumerable<TSource>, Func<TSource, short>)

    Determines the sum of values.

    Declaration
    public static short Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, short> selector)
    Parameters
    Type Name Description
    IEnumerable<TSource> source

    Represents the queryable source.

    Func<TSource, short> selector

    Represents the expression function.

    Returns
    Type Description
    short

    Returns the sum value.

    Type Parameters
    Name Description
    TSource

    Represents the generic type parameter.

    Sum<TSource>(IEnumerable<TSource>, Func<TSource, short?>)

    Determines the sum of values.

    Declaration
    public static short? Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, short?> selector)
    Parameters
    Type Name Description
    IEnumerable<TSource> source

    Represents the queryable source.

    Func<TSource, short?> selector

    Represents the expression function.

    Returns
    Type Description
    short?

    Returns the sum value.

    Type Parameters
    Name Description
    TSource

    Represents the generic type parameter.

    Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource, short>>)

    Determines the sum of values.

    Declaration
    [RequiresUnreferencedCode("The Sum is not trim compatible")]
    [RequiresDynamicCode("This method relies on dynamic code generation.")]
    public static short Sum<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, short>> selector)
    Parameters
    Type Name Description
    IQueryable<TSource> source

    Represents the queryable source.

    Expression<Func<TSource, short>> selector

    Represents the expression function.

    Returns
    Type Description
    short

    Returns the sum value.

    Type Parameters
    Name Description
    TSource

    Represents the generic type parameter.

    Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource, short?>>)

    Determines the sum of values.

    Declaration
    [RequiresUnreferencedCode("The Sum is not trim compatible")]
    [RequiresDynamicCode("This method relies on dynamic code generation.")]
    public static short? Sum<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, short?>> selector)
    Parameters
    Type Name Description
    IQueryable<TSource> source

    Represents the queryable source.

    Expression<Func<TSource, short?>> selector

    Represents the expression function.

    Returns
    Type Description
    short?

    Returns the sum value.

    Type Parameters
    Name Description
    TSource

    Represents the generic type parameter.

    ThenByDescending<T>(IOrderedEnumerable<T>, string, Func<string, object, object>)

    Gets the sorting order.

    Declaration
    [RequiresUnreferencedCode("The ThenByDescending is not trim compatible")]
    public static IEnumerable<T> ThenByDescending<T>(this IOrderedEnumerable<T> entities, string propertyName, Func<string, object, object> getFunc)
    Parameters
    Type Name Description
    IOrderedEnumerable<T> entities

    Represents the collection entity.

    string propertyName

    Represents the property name.

    Func<string, object, object> getFunc

    Represents the function.

    Returns
    Type Description
    IEnumerable<T>

    Returns the enumerable collection.

    Type Parameters
    Name Description
    T

    Represents the generic type parameter.

    ThenByDescending<T>(IOrderedEnumerable<T>, string, Func<string, object, object>, IComparer<object>)

    Gets the sorting order.

    Declaration
    [RequiresUnreferencedCode("The ThenByDescending is not trim compatible")]
    public static IEnumerable<T> ThenByDescending<T>(this IOrderedEnumerable<T> entities, string propertyName, Func<string, object, object> getFunc, IComparer<object> comparer)
    Parameters
    Type Name Description
    IOrderedEnumerable<T> entities

    Represents the collection entity.

    string propertyName

    Represents the property name.

    Func<string, object, object> getFunc

    Represents the function.

    IComparer<object> comparer

    Represents the comparer.

    Returns
    Type Description
    IEnumerable<T>

    Returns the enumerable collection.

    Type Parameters
    Name Description
    T

    Represents the generic type parameter.

    ThenBy<T>(IOrderedEnumerable<T>, string, Func<string, object, object>)

    Gets the sorting order.

    Declaration
    [RequiresUnreferencedCode("The ThenBy is not trim compatible")]
    public static IEnumerable<T> ThenBy<T>(this IOrderedEnumerable<T> entities, string propertyName, Func<string, object, object> getFunc)
    Parameters
    Type Name Description
    IOrderedEnumerable<T> entities

    Represents the collection entity.

    string propertyName

    Represents the property name.

    Func<string, object, object> getFunc

    Represents the function.

    Returns
    Type Description
    IEnumerable<T>

    Returns the enumerable collection.

    Type Parameters
    Name Description
    T

    Represents the generic type parameter.

    ThenBy<T>(IOrderedEnumerable<T>, string, Func<string, object, object>, IComparer<object>)

    Gets the sorting order.

    Declaration
    [RequiresUnreferencedCode("The ThenBy is not trim compatible")]
    public static IEnumerable<T> ThenBy<T>(this IOrderedEnumerable<T> entities, string propertyName, Func<string, object, object> getFunc, IComparer<object> comparer)
    Parameters
    Type Name Description
    IOrderedEnumerable<T> entities

    Represents the collection entity.

    string propertyName

    Represents the property name.

    Func<string, object, object> getFunc

    Represents the function.

    IComparer<object> comparer

    Represents the comparer.

    Returns
    Type Description
    IEnumerable<T>

    Returns the enumerable collection.

    Type Parameters
    Name Description
    T

    Represents the generic type parameter.

    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved