asp.net.ph

DataSet.Clone Method

System.Data Namespace   DataSet Class


Copies the structure of the DataSet, including all DataTable schemas, relations, and constraints.

[ VB ]
Public Function Clone ( ) As DataSet

[ C# ]
public DataSet Clone ( );

[ C++ ]
public: DataSet* Clone ( );

[ JScript ]
public function Clone ( ) : DataSet;

Return Value

A new DataSet with the same schema as the current DataSet, , but none of the data.

Remarks

NOTE: If these classes have been subclassed, the clone will also be of the same subclasses.

Example

The following example initializes a clone of a DataSet object's schema.

private void CloneDataSet ( DataSet myDataSet ) {
   // initialize a dataset object for the clone.
   DataSet cloneDataSet = myDataSet.Clone ( );

   // ... code to work with the clone here ...
}
  C# VB

See Also

DataSet Members   Copy Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph