Wednesday, 23 April 2014

what is difference between DataSet.copy() and DataSet.clone()

DataSet.copy() :
  • DataSet.Copy() method copies both the structure and data.
Example of clone(): 
                      <pre lang="cs">
                      DataSet dswtihdata;
                     DataSet dsnew;
                     dsnew=dswithdata.copy();


DataSet.Clone() :

  • DataSet.clone() method copies the structure of the DataSet including all the datatable schemas, relations and constraints. 
  • But Doen't copy any data.
Example of clone(): 
              DataSet ds; //This is containing Data table schema.
              DataSet ds1;
              ds1= ds.clone();
                        

No comments:

Post a Comment