DataConnectionProperties.Add 方法

定义

重载

Add(String, Object)

向当前连接属性集合添加新属性。Adds a new property to the current connection properties collection.

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.

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

参数

key
String

要添加的属性的名称。Name of the property being added.

value
Object

要添加的属性的值。Value of the property being added.

实现

例外

key 参数为 null。The key parameter is null.

数据连接属性不可扩展。The data connection properties are not extensible.

该属性已存在。The property already exists.

适用于

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 void Add (string key, Type type, object value);
abstract member Add : string * Type * obj -> unit
override this.Add : string * Type * obj -> unit
Public Sub Add (key As String, type As Type, value As Object)

参数

key
String

要添加的属性的名称。Name of the property being added.

type
Type

一个 Type 表示属性类型的对象。A Type object representing the type of the property.

value
Object

要添加的属性的值。Value of the property being added.

实现

例外

key 参数为 null。The key parameter is null.

数据连接属性不可扩展。The data connection properties are not extensible.

该属性已存在。The property already exists.

适用于