Search Results for

    Show / Hide Table of Contents

    Class EnumerableExtensions

    Extension methods for ease of access

    Inheritance
    System.Object
    EnumerableExtensions
    Namespace: ImageVault.Common.Lib
    Assembly: ImageVault.Common.dll
    Syntax
    public static class EnumerableExtensions : Object

    Methods

    Distinct<T>(IEnumerable<T>, Func<T, Int32>)

    Returns distinct elements from a sequence by using a specified hashmethod to compare values.

    Declaration
    public static IEnumerable<T> Distinct<T>(this IEnumerable<T> source, Func<T, int> hashMethod)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> source

    The sequence to remove duplicate elements from.

    System.Func<T, System.Int32> hashMethod

    If this function returns the same integer for two instances, then those instances are considered equal and the last one is removed.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>

    An System.Collections.Generic.IEnumerable<> that contains distinct elements from the source sequence.

    Type Parameters
    Name Description
    T

    The type of the elements of source.

    Exceptions
    Type Condition
    System.ArgumentNullException

    If source is null or if hashMethod is null.

    In This Article
    Back to top (c) Meriworks 2002-2022