共用方式為


WebBaseEventCollection.Contains(WebBaseEvent) 方法

定義

指示集合是否含有指定的 WebBaseEvent 物件。

public:
 bool Contains(System::Web::Management::WebBaseEvent ^ value);
public bool Contains (System.Web.Management.WebBaseEvent value);
member this.Contains : System.Web.Management.WebBaseEvent -> bool
Public Function Contains (value As WebBaseEvent) As Boolean

參數

value
WebBaseEvent

要搜尋的 WebBaseEvent 物件。

傳回

如果集合包含指定的項目則為 true,否則為 false

範例

下列程式碼範例示範如何使用 Contains 屬性。

// Check if the specified event is in the collection.
public static bool ContainsEvent(WebBaseEvent ev)
{
    return events.Contains(ev);
}
' Chek if the specified event is in the collection.
Public Shared Function ContainsEvent(ByVal ev _
As WebBaseEvent) As Boolean
    Return events.Contains(ev)

End Function 'ContainsEvent

適用於

另請參閱