Creates a new instance of the object initialized with the current connection string.
[Visual Basic] Overridable Public Function Clone() As Object [C#] public virtual object Clone(); [C++] public: virtual Object* Clone(); [JScript] public function Clone() : Object;
The new instance will be in a closed state.
Notes to Inheritors: When overriding Clone in a derived class, be sure to call the base class's Clone method.
The following example creates a connection, set some of its properties, clones it, then resets the properties of the original instance.
DBConnection Class | DBConnection Members | System.Data.Internal Namespace