Verifies that the sequence of objects contains distinct values.
Namespace:
MbUnit.FrameworkAssembly: MbUnit (in MbUnit.dll) Version: 3.3.0.0 (3.3.459.0)
Syntax
| C# |
|---|
public static void Distinct<T>( IEnumerable<T> values, IEqualityComparer<T> comparer ) |
| Visual Basic (Declaration) |
|---|
Public Shared Sub Distinct(Of T) ( _ values As IEnumerable(Of T), _ comparer As IEqualityComparer(Of T) _ ) |
Parameters
- values
- Type: System.Collections.Generic..::.IEnumerable<(Of <(T>)>)
The sequence of values to be tested.
- comparer
- Type: System.Collections.Generic..::.IEqualityComparer<(Of <(T>)>)
The comparer to use, or null to use the default one.
Type Parameters
- T
- The type of value.
Exceptions
| Exception | Condition |
|---|---|
| Gallio.Framework.Assertions..::.AssertionException | Thrown if the verification failed unless the current AssertionFailureBehavior indicates otherwise. |
