Click or drag to resize

ExtensionMethodsToListSafeT Method

Converts the passed in enumerable to a List(Of T). If toEnumerate is a CommandifiedList(Of T) it will lock on its SyncRoot if it's a synchronized CommandifiedList. if it's not a commandified list, it will simply call ToList() on the enumerable. If toEnumerate is null, null is returned.

Namespace:  SD.LLBLGen.Pro.Core
Assembly:  SD.LLBLGen.Pro.Core (in SD.LLBLGen.Pro.Core.dll) Version: 5.11.0.0 (5.11.23.1114)
Syntax
public static List<T> ToListSafe<T>(
	this IEnumerable<T> toEnumerate
)

Parameters

toEnumerate
Type: System.Collections.GenericIEnumerableT
To enumerate.

Type Parameters

T

Return Value

Type: ListT

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).
See Also