Поделиться через


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 Объект, для которого требуется получить индекс.

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

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

Исключения

Объект не находится в коллекции.

Примеры

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

// 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

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

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