示例#1
0
文件: DataSet.cs 项目: top501/DVTK-1
        //
        // - 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);
        }