AdoDotNetConnectionProperties.Add Method (String, Object)
Adds a new property to the current connection properties collection. Raises the PropertyChanged event.
Namespace: Microsoft.VisualStudio.Data.Framework.AdoDotNet
Assembly: Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)
Syntax
'Declaration
Public Overridable Sub Add ( _
key As String, _
value As Object _
)
public virtual void Add(
string key,
Object value
)
public:
virtual void Add(
String^ key,
Object^ value
)
abstract Add :
key:string *
value:Object -> unit
override Add :
key:string *
value:Object -> unit
public function Add(
key : String,
value : Object
)
Parameters
key
Type: System.StringName of the property being added.
value
Type: System.ObjectValue of the property being added.
Implements
IDictionary<TKey, TValue>.Add(TKey, TValue)
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The propertyName parameter is nulla null reference (Nothing in Visual Basic). |
NotSupportedException | The connection string is not extensible. |
ArgumentException | The property already exists. |
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.