Point3DKeyFrameCollection.IndexOf(Point3DKeyFrame) 方法

定義

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

public:
 int IndexOf(System::Windows::Media::Animation::Point3DKeyFrame ^ keyFrame);
public int IndexOf (System.Windows.Media.Animation.Point3DKeyFrame keyFrame);
member this.IndexOf : System.Windows.Media.Animation.Point3DKeyFrame -> int
Public Function IndexOf (keyFrame As Point3DKeyFrame) As Integer

參數

keyFrame
Point3DKeyFrame

要在集合中尋找的 Point3DKeyFrame

傳回

如有找到,則為整個集合內 keyFrame 的第一個符合項目之以零為起始的索引,否則為 -1

備註

集合會從第一個主要畫面格開始向前搜尋,最後一個主要畫面格結束。

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

這個方法會呼叫 Object.Equals 來判斷相等。

適用於

另請參閱