Extensions.ToAdvisableHashSet<T> Method |
Converts an IEnumerable<T> into an AdvisableHashSet<T>.
Namespace: PostSharp.Patterns.Collections
Assembly: PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 5.0.55.0 (5.0.55.0)

C#
public static AdvisableHashSet<T> ToAdvisableHashSet<T>( this IEnumerable<T> collection )
Parameters
- collection
- Type: System.Collections.Generic.IEnumerable<T>
An IEnumerable<T>, or null.
Type Parameters
- T
- Type of collection items.
Return Value
Type: AdvisableHashSet<T>A new AdvisableHashSet<T> containing all elements of collection, or null if collection is empty.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable<T>. 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).