7.9 Copying the Table

The Copy( ) method creates a new DataTable with the same structure and data as the original. The following example uses the Copy( ) method to create a new DataTable:

// create a DataTable object variable to receive the copy
DataTable copyDt;
copyDt = dt.Copy();

    Part I: ADO.NET Tutorial
    Part II: ADO.NET Core Classes
    Part III: API Quick Reference