GridViewHelperToDataTableT Method (IListT, String) | Helper帮助文档 |
将泛型集合类转换成DataTable
Namespace: HD.Common
Assembly: HD.Common (in HD.Common.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static DataTable ToDataTable<T>( IList<T> list, params string[] propertyName )
Public Shared Function ToDataTable(Of T) ( list As IList(Of T), ParamArray propertyName As String() ) As DataTable
public: generic<typename T> static DataTable^ ToDataTable( IList<T>^ list, ... array<String^>^ propertyName )
static member ToDataTable : list : IList<'T> * propertyName : string[] -> DataTable
Parameters
- list
- Type: System.Collections.GenericIListT
集合 - propertyName
- Type: SystemString
需要返回的列的列名
Type Parameters
- T
- 集合项类型
Return Value
Type: DataTable数据集(表)
See Also