Class EnumerableExtensions
Extension methods for ease of access
Inheritance
System.Object
EnumerableExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: ImageVault.Common.Lib
Assembly: ImageVault.Common.dll
Syntax
public static class EnumerableExtensions
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<T> 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 |