EnumerableExtensionsToHashsetT Method

Creates a HashSetT from an IEnumerableT.

Definition

Namespace: Karamba.Utilities
Assembly: KarambaCommon (in KarambaCommon.dll) Version: 3.0.8.0+eb23a7103f0eca0b6d808121e15fec6899194e15
C#
public static HashSet<T> ToHashset<T>(
	this IEnumerable<T> source
)

Parameters

source  IEnumerableT
The input sequence.

Type Parameters

T
The type of the input sequence.

Return Value

HashSetT
A that contains unique elements from the input sequence.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableT. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Exceptions

ArgumentNullException Thrown if the input sequence is .

See Also