DataObjectMethodAttribute.IsDefault 屬性

定義

取得值,指出套用 DataObjectMethodAttribute 的方法是否為資料物件針對指定的方法型別所公開的預設資料方法。

public:
 property bool IsDefault { bool get(); };
public bool IsDefault { get; }
member this.IsDefault : bool
Public ReadOnly Property IsDefault As Boolean

屬性值

如果方法是物件為方法型別所公開的預設方法,則為 true,否則為 false

備註

ObjectDataSource控件會IsDefault使用 屬性來區別多個符合特定方法類型的簽章需求的方法。 如果兩種方法符合簽章需求,則會選取 屬性設定為 true 的方法IsDefault

在設計時間,IsDefault屬性是用來在實例上ObjectDataSource自動設定SelectMethodUpdateMethodDeleteMethodInsertMethod 屬性。

DataObjectMethodAttribute如果使用只採用 參數的DataObjectMethodAttribute(DataObjectMethodType)建構函式建立 DataObjectMethodType ,則 IsDefault 屬性會設定為 false

適用於