Click or drag to resize

ExtensionMethods.ToListSafe<T> 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.12.0.0 (5.12.0)
Syntax
public static List<T> ToListSafe<T>(
	this IEnumerable<T> toEnumerate
)

Parameters

toEnumerate
Type: System.Collections.Generic.IEnumerable<T>
To enumerate.

Type Parameters

T

Return Value

Type: List<T>

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