CollectionUtilities..::..AsList<(Of <(<'T>)>)> Method

Returns the enumeration as an IList. If it isn't already an IList, it makes it into one so that you can safely enumeration the list multiple times.

Namespace:  Tortuga.Anchor
Assembly:  Tortuga.Anchor (in Tortuga.Anchor.dll)

Syntax


public static Nullable<IList<T>> AsList<T>(
	Nullable<IEnumerable<T>> source
)
Public Shared Function AsList(Of T) ( _
	source As Nullable(Of IEnumerable(Of T)) _
) As Nullable(Of IList(Of T))

Type Parameters

T

Parameters

source
Type: Nullable<(Of <(<'IEnumerable<(Of <(<'T>)>)>>)>)>
The source. If the source is null, the result will be null.

Return Value

Returns an IList.

Remarks


This is primarily meant to be used with poorly designed interfaces that return lists disguised as IEnumerable.