Lenguaje

HttpHandlerActionCollection.IndexOf(HttpHandlerAction) Método

Definición

Obtiene el índice de colección del objeto especificado HttpHandlerAction .

public:
 int IndexOf(System::Web::Configuration::HttpHandlerAction ^ action);
public int IndexOf(System.Web.Configuration.HttpHandlerAction action);
member this.IndexOf : System.Web.Configuration.HttpHandlerAction -> int
Public Function IndexOf (action As HttpHandlerAction) As Integer

Parámetros

action
HttpHandlerAction

Objeto HttpHandlerAction para el que se va a obtener el índice de la colección.

Devoluciones

Valor de índice de colección.

Ejemplos

En el ejemplo de código siguiente se muestra cómo obtener un HttpHandlerAction índice de colección de objetos.


// Get the specified handler's index.
HttpHandlerAction httpHandler2 = new HttpHandlerAction(
"Calculator.custom",
"Samples.Aspnet.SystemWebConfiguration.Calculator, CalculatorHandler",
"GET", true);
int handlerIndex = httpHandlers.IndexOf(httpHandler2);

'Get the specified handler's index.
Dim httpHandler2 As System.Web.Configuration.HttpHandlerAction  = new HttpHandlerAction( _
"Calculator.custom", _
"Samples.Aspnet.SystemWebConfiguration.Calculator, CalculatorHandler", _
"GET", _
true)
Dim handlerIndex As Integer = httpHandlers.IndexOf(httpHandler2)

Comentarios

Antes de usar este método, debe identificar un HttpHandlerAction objeto con el nombre y el tipo adecuados. A continuación, puede usar este objeto para obtener su índice de colección.

Se aplica a