AdoDotNetConnectionProperties.Add 方法 (String, Type, Object)

添加新的属性绑定到当前连接属性集合。

命名空间:  Microsoft.VisualStudio.Data.Framework.AdoDotNet
程序集:  Microsoft.VisualStudio.Data.Framework(在 Microsoft.VisualStudio.Data.Framework.dll 中)

语法

声明
Public Overridable Sub Add ( _
    key As String, _
    type As Type, _
    value As Object _
)
public virtual void Add(
    string key,
    Type type,
    Object value
)
public:
virtual void Add(
    String^ key, 
    Type^ type, 
    Object^ value
)
abstract Add : 
        key:string * 
        type:Type * 
        value:Object -> unit 
override Add : 
        key:string * 
        type:Type * 
        value:Object -> unit 
public function Add(
    key : String, 
    type : Type, 
    value : Object
)

参数

实现

IVsDataConnectionProperties.Add(String, Type, Object)

异常

异常 条件
ArgumentNullException

propertyName 参数为 nullnull 引用(在 Visual Basic 中为 Nothing)。

NotSupportedException

连接字符串不是可扩展的。

ArgumentException

属性已存在。

.NET Framework 安全性

请参见

参考

AdoDotNetConnectionProperties 类

Add 重载

Microsoft.VisualStudio.Data.Framework.AdoDotNet 命名空间