共用方式為


AdoDotNetConnectionProperties.Add Method

Definition

Overloads

Add(String, Object)

Adds a new property to the current connection properties collection. Raises the PropertyChanged event.

Add(String, Type, Object)

Adds a new property to the current connection properties collection.

Add(String, Object)

Adds a new property to the current connection properties collection. Raises the PropertyChanged event.

public:
 virtual void Add(System::String ^ key, System::Object ^ value);
public virtual void Add (string key, object value);
abstract member Add : string * obj -> unit
override this.Add : string * obj -> unit
Public Overridable Sub Add (key As String, value As Object)

Parameters

key
String

Name of the property being added.

value
Object

Value of the property being added.

Implements

Exceptions

The propertyName parameter is null.

The connection string is not extensible.

The property already exists.

Applies to

Add(String, Type, Object)

Adds a new property to the current connection properties collection.

public:
 virtual void Add(System::String ^ key, Type ^ type, System::Object ^ value);
public virtual void Add (string key, Type type, object value);
abstract member Add : string * Type * obj -> unit
override this.Add : string * Type * obj -> unit
Public Overridable Sub Add (key As String, type As Type, value As Object)

Parameters

key
String

Name of the property being added.

type
Type

Type of the property being added.

value
Object

Value of the property being added.

Implements

Exceptions

The propertyName parameter is null.

The connection string is not extensible.

The property already exists.

Applies to