WebBaseEventCollection.IndexOf(WebBaseEvent) Метод

Определение

Возвращает индекс указанного объекта WebBaseEvent.

public:
 int IndexOf(System::Web::Management::WebBaseEvent ^ value);
public int IndexOf (System.Web.Management.WebBaseEvent value);
member this.IndexOf : System.Web.Management.WebBaseEvent -> int
Public Function IndexOf (value As WebBaseEvent) As Integer

Параметры

value
WebBaseEvent

Объект WebBaseEvent, для которого необходимо получить индекс.

Возвращаемое значение

Int32

Индекс указанного объекта WebBaseEvent в коллекции.

Исключения

Объект отсутствует в коллекции.

Примеры

В следующем примере кода показано, как использовать свойство IndexOf.

// Get the index of the specified event.
public static int GetIndexOf(WebBaseEvent ev)
{
    return events.IndexOf(ev);
}
' Get the index of the specified event.
Public Shared Function GetIndexOf(ByVal ev _
As WebBaseEvent) As Integer
    Return events.IndexOf(ev)

End Function 'GetIndexOf

Применяется к

См. также раздел