共用方式為


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 命名空間