Adds a new property to the current connection properties collection.
Namespace: Microsoft.VisualStudio.Data.Framework.AdoDotNet
Assembly: Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)
Syntax
'宣言
Public Overridable Sub Add ( _
key As String, _
type As Type, _
value As Object _
)
'使用
Dim instance As AdoDotNetConnectionProperties
Dim key As String
Dim type As Type
Dim value As Object
instance.Add(key, type, value)
public virtual void Add(
string key,
Type type,
Object value
)
public:
virtual void Add(
String^ key,
Type^ type,
Object^ value
)
public function Add(
key : String,
type : Type,
value : Object
)
Parameters
key
Type: System.StringName of the property being added.
type
Type: System.TypeType of the property being added.
value
Type: System.ObjectValue of the property being added.
Implements
IVsDataConnectionProperties.Add(String, Type, Object)
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | The propertyName parameter is a null reference (Nothing in Visual Basic). |
| NotSupportedException | The connection string is not extensible. |
| ArgumentException | The property already exists. |
Permissions
- 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.
See Also
Reference
AdoDotNetConnectionProperties Class