WebBaseEventCollection.IndexOf Method (WebBaseEvent)

 

Gets the index of the specified WebBaseEvent object.

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

public int IndexOf(
	WebBaseEvent value
)

Parameters

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
ArgumentOutOfRangeException

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
Show: