PostSharpAPI ReferencePost­Sharp.​Patterns.​CollectionsExtensionsTo­Advisable­Hash­Set
Open sandboxFocus

Extensions.ToAdvisableHashSet Method

ToAdvisableHashSet<T>(IEnumerable<T>)

Converts an System.Collections.Generic.IEnumerable<> into an AdvisableHashSet<T>.

Declaration
public static AdvisableHashSet<T> ToAdvisableHashSet<T>(this IEnumerable<T> collection)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T> collection

An System.Collections.Generic.IEnumerable<>, or null.

Returns
Type Description
AdvisableHashSet<T>

A new AdvisableHashSet<T> containing all elements of collection, or null if collection is empty.

Type Parameters
Name Description
T

Type of collection items.