DataTable.Copy()
If you only need to copy the schema without the info specified in the datarow, do :
DataTable.Clone()
As specified on msdn : http://msdn2.microsoft.com/en-us/library/system.data.datatable.clone.aspx
Both the Copy and the Clone methods create a new DataTable with the same structure as the original DataTable. The new DataTable created by the Copy method has the same set of DataRows as the original table, but the new DataTable created by the Clone method does not contain any DataRows.
Aucun commentaire:
Enregistrer un commentaire