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

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

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

语法

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

参数

  • key
    类型:String

    属性的名称中。

  • type
    类型:Type

    表示属性的类型的 Type 对象。

  • value
    类型:Object

    添加属性的值。

实现

IVsDataConnectionProperties.Add(String, Type, Object)

异常

异常 条件
ArgumentNullException

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

NotSupportedException

数据连接属性不可扩展。

ArgumentException

属性已经存在。

.NET Framework 安全性

请参阅

参考

DataConnectionProperties 类

Add 重载

Microsoft.VisualStudio.Data.Framework 命名空间