PathFigureCollection.IndexOf(PathFigure) 方法

定義

搜尋指定的 PathFigure,並傳回在整個集合中第一個符合項目之以零為起始的索引。

public:
 virtual int IndexOf(System::Windows::Media::PathFigure ^ value);
public int IndexOf (System.Windows.Media.PathFigure value);
abstract member IndexOf : System.Windows.Media.PathFigure -> int
override this.IndexOf : System.Windows.Media.PathFigure -> int
Public Function IndexOf (value As PathFigure) As Integer

參數

value
PathFigure

要在集合中尋找的 PathFigure

傳回

如果在 PathFigureCollection 中找到,為 value 的索引,否則為 -1。

實作

備註

從第一個開始搜尋集合,最後一個 PathFigure 結束。 PathFigure

此方法會執行線性搜尋;因此,平均執行時間會與 的值 Count 成正比。 也就是說,這個方法是 o (n) 作業,其中 n 等於 Count

適用於

另請參閱