共用方式為


DataConnectionProperties.ModifyProperty 方法

修改目前執行個體 DataConnectionProperties 原本就知道現有屬性。

命名空間:  Microsoft.VisualStudio.Data
組件:  Microsoft.VisualStudio.Data (在 Microsoft.VisualStudio.Data.dll 中)

語法

'宣告
Protected Sub ModifyProperty ( _
    name As String, _
    ParamArray attributes As Attribute() _
)
protected void ModifyProperty(
    string name,
    params Attribute[] attributes
)
protected:
void ModifyProperty(
    String^ name, 
    ... array<Attribute^>^ attributes
)
member ModifyProperty : 
        name:string * 
        attributes:Attribute[] -> unit 
protected function ModifyProperty(
    name : String, 
    ... attributes : Attribute[]
)

參數

  • attributes
    型別:array<System.Attribute[]
    應該加入或修改的一組屬性。

例外狀況

例外狀況 條件
ArgumentNullException

name 參數為 null。

備註

這個方法允許變更屬性與現有屬性。例如,的屬性會成為根據值的唯讀設定到另一個屬性在某些情況下可能是必要的。當這個第二個屬性變更時,資料提供者會呼叫 ModifyProperty 方法,並以正確的值 ReadOnlyAttribute

.NET Framework 安全性

請參閱

參考

DataConnectionProperties 類別

Microsoft.VisualStudio.Data 命名空間