PathFigureCollection.IndexOf(PathFigure) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
搜尋指定的 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
傳回
若在 中,value則PathFigureCollection為 的索引;否則為 -1。
實作
備註
該集合從第一個 PathFigure 開始向前搜尋,直到最後 PathFigure一個。
此方法執行線性搜尋;因此,平均執行時間與 的 Count值成正比。 也就是說,此方法是一個 O(n) 運算,其中 n 等於 Count。