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!

DBConnection.Clone

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;

Remarks

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.

Example

The following example creates a connection, set some of its properties, clones it, then resets the properties of the original instance.

See Also

DBConnection Class | DBConnection Members | System.Data.Internal Namespace