Extensions.ToAdvisableCollection<T> Method |
Converts an IEnumerable<T> into an AdvisableCollection<T>.
Namespace: PostSharp.Patterns.Collections
Assembly: PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.2.13.0 (6.2.13.0)

C#
public static AdvisableCollection<T> ToAdvisableCollection<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: AdvisableCollection<T>A new AdvisableCollection<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).