ByteKeyFrameCollection.Contains(ByteKeyFrame) 方法

定义

指示集合中是否包含指定的 ByteKeyFrameIndicates whether the collection contains the specified ByteKeyFrame.

public:
 bool Contains(System::Windows::Media::Animation::ByteKeyFrame ^ keyFrame);
public bool Contains (System.Windows.Media.Animation.ByteKeyFrame keyFrame);
member this.Contains : System.Windows.Media.Animation.ByteKeyFrame -> bool
Public Function Contains (keyFrame As ByteKeyFrame) As Boolean

参数

keyFrame
ByteKeyFrame

要在集合中查找的关键帧。The key frame to locate in the collection.

返回

如果集合包含 keyFrame,则为 true;否则为 falsetrue if the collection contains keyFrame; otherwise, false.

注解

此方法执行线性搜索;因此, 平均执行时间与成正比CountThis method performs a linear search; therefore, the average execution time is proportional to Count. 也就是说, 此方法的运算复杂度为 O (n), 其中nCountThat is, this method is an O(n) operation, where n is Count.

此方法通过调用Object.Equals来确定相等性。This method determines equality by calling Object.Equals.

适用于

另请参阅