NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataSet.Clone

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

[Visual Basic]
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.

Remarks

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

Example [Visual Basic]

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

[Visual Basic]

Private Sub Get Clone()
   Dim myDataView As DataView
   myDataView = DataSet1.DefautView
   Dim ds2 As DataSet
   ds2.DefaultView
End Sub

See Also

DataSet Class | DataSet Members | System.Data Namespace | Copy