Obtains the data as a list; if it is *already* a list, the original object is returned without
any duplication; otherwise, ToList() is invoked.
Namespace: DapperAssembly: VirtualRadar.Database (in VirtualRadar.Database.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public static List<T> AsList<T>(
this IEnumerable<T> source
)
<ExtensionAttribute>
Public Shared Function AsList(Of T) (
source As IEnumerable(Of T)
) As List(Of T)
public:
[ExtensionAttribute]
generic<typename T>
static List<T>^ AsList(
IEnumerable<T>^ source
)
[<ExtensionAttribute>]
static member AsList :
source : IEnumerable<'T> -> List<'T>
Parameters
- source
- Type: System.Collections.GenericIEnumerableT
Type Parameters
- T
Return Value
Type:
ListTUsage 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