WebBaseEventCollection.Contains Method (WebBaseEvent)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Indicates whether the collection contains the specified WebBaseEvent object.

Namespace:   System.Web.Management
Assembly:  System.Web (in System.Web.dll)

public bool Contains(
	WebBaseEvent value


Type: System.Web.Management.WebBaseEvent

The WebBaseEvent object to search for.

Return Value

Type: System.Boolean

true if the collection contains the specified element; otherwise, false.

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);

.NET Framework
Available since 2.0
Return to top