DataControlFieldCollection.Contains(DataControlField) 方法

定義

判斷 DataControlFieldCollection 集合是否含有特定 DataControlField 物件。Determines whether the DataControlFieldCollection collection contains a specific DataControlField object.

public:
 bool Contains(System::Web::UI::WebControls::DataControlField ^ field);
public bool Contains (System.Web.UI.WebControls.DataControlField field);
member this.Contains : System.Web.UI.WebControls.DataControlField -> bool
Public Function Contains (field As DataControlField) As Boolean

參數

傳回

Boolean

如果 DataControlFieldCollection 包含指定的欄位,則為 true,否則為 falsetrue if the DataControlFieldCollection contains the specified field; otherwise, false.

備註

這個方法會執行線性搜尋。This method performs a linear search. 它會藉由呼叫來判斷是否相等 Object.EqualsIt determines equality by calling Object.Equals.

適用於