Share via


StyleCollection.IndexOf(Style) 方法

定義

傳回指定的 Style 物件在集合中的索引。

public:
 int IndexOf(System::Web::UI::WebControls::Style ^ style);
public int IndexOf (System.Web.UI.WebControls.Style style);
member this.IndexOf : System.Web.UI.WebControls.Style -> int
Public Function IndexOf (style As Style) As Integer

參數

style
Style

要在集合中尋找的 Style

傳回

集合中第一次出現 style 之以零起始的索引;如果樣式不在集合中,則為 -1。

備註

方法 Contains 會使用 Equals 物件上的 Style 方法來判斷相等。

適用於

另請參閱