Click or drag to resize

DataTableETLDataTableToListT Method

imbSCI | imbACE | imbNLP | imbWEM | imbWBI
Converts a DataTable to a list with generic objects. credits: https://codereview.stackexchange.com/questions/30714/converting-datatable-to-list-of-class

Namespace:  imbSCI.DataComplex.extensions.data.operations
Assembly:  imbSCI.DataComplex (in imbSCI.DataComplex.dll) Version: 0.3.70.
Syntax
C#
public static IEnumerable<T> DataTableToList<T>(
	this DataTable table
)
where T : class, new()
Request Example View Source

Parameters

table
Type: System.DataDataTable
DataTable

Type Parameters

T
Generic object

Return Value

Type: IEnumerableT
List with generic objects

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DataTable. 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