// // - Methods - // /// <summary> /// Creates a deep copy of this instance. /// </summary> /// <returns>A deep copy of this instance.</returns> public DataSet Clone() { // Create an empty Data Set. DataSet cloneDataSet = new DataSet(); // Copy all attributes. for (int index = 0; index < this.Count; index++) { // The Add method will take care of the deep copy. cloneDataSet.Add(this[index]); } // Return the deep copy. return(cloneDataSet); }