DataConnectionProperties.Add Method (String, Object)

Adds a new property to the current connection properties collection.

Namespace:  Microsoft.VisualStudio.Data.Framework
Assembly:  Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)

Syntax

'宣言
Public Sub Add ( _
    key As String, _
    value As Object _
)
'使用
Dim instance As DataConnectionProperties
Dim key As String
Dim value As Object

instance.Add(key, value)
public void Add(
    string key,
    Object value
)
public:
virtual void Add(
    String^ key, 
    Object^ value
) sealed
public final function Add(
    key : String, 
    value : Object
)

Parameters

Implements

IDictionary<TKey, TValue>.Add(TKey, TValue)

Exceptions

Exception Condition
ArgumentNullException

The key parameter is a null reference (Nothing in Visual Basic).

NotSupportedException

The data connection properties are not extensible.

ArgumentException

The property already exists.

Permissions

See Also

Reference

DataConnectionProperties Class

DataConnectionProperties Members

Add Overload

Microsoft.VisualStudio.Data.Framework Namespace