WebBaseEventCollection.Contains(WebBaseEvent) 方法
定义
指示集合中是否包含指定的 WebBaseEvent 对象。Indicates whether the collection contains the specified WebBaseEvent object.
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 对象。The WebBaseEvent object to search for.
返回
如果该集合包含指定元素,则为 true;否则为 false。true if the collection contains the specified element; otherwise, false.
示例
下面的代码示例说明如何使用 Contains 属性。The following code example shows how to use the Contains property.
// 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