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 对象。

返回

Boolean

如果该集合包含指定元素,则为 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

适用于

另请参阅