WebBaseEventCollection.IndexOf 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.

Gets the index of the specified WebBaseEvent object.

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

public int IndexOf(
	WebBaseEvent value


Type: System.Web.Management.WebBaseEvent

The WebBaseEvent object for which to obtain the index.

Return Value

Type: System.Int32

The index of the specified WebBaseEvent object within the collection.

Exception Condition

The object is not in the collection.

The following code example shows how to use the IndexOf property.

// Get the index of the specified event.
public static int GetIndexOf(WebBaseEvent ev)
    return events.IndexOf(ev);

.NET Framework
Available since 2.0
Return to top