语言

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 方法确定相等性。

适用于

另请参阅