StatusBar.StatusBarPanelCollection.Contains(StatusBarPanel) StatusBar.StatusBarPanelCollection.Contains(StatusBarPanel) StatusBar.StatusBarPanelCollection.Contains(StatusBarPanel) StatusBar.StatusBarPanelCollection.Contains(StatusBarPanel) Method

定义

确定指定的面板是否位于集合内。Determines whether the specified panel is located within the collection.

public:
 bool Contains(System::Windows::Forms::StatusBarPanel ^ panel);
public bool Contains (System.Windows.Forms.StatusBarPanel panel);
member this.Contains : System.Windows.Forms.StatusBarPanel -> bool
Public Function Contains (panel As StatusBarPanel) As Boolean

参数

panel
StatusBarPanel StatusBarPanel StatusBarPanel StatusBarPanel

要在集合中查找的 StatusBarPanelThe StatusBarPanel to locate in the collection.

返回

如果面板位于集合内,则为 true;否则为 falsetrue if the panel is located within the collection; otherwise, false.

注解

Contains方法使您能够确定面板是否是集合的成员。The Contains method enables you to determine whether a panel is a member of the collection. 一旦您知道项位于集合内,就可以使用IndexOf方法可确定面板是否位于集合内。Once you know that the item is located within the collection, you can use the IndexOf method to determine where the panel is located within the collection.

适用于

另请参阅