HttpHandlerActionCollection.IndexOf(HttpHandlerAction) Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Obtém o índice de coleção do 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
O HttpHandlerAction objeto para o qual obter o índice da coleção.
Devoluções
O valor do índice de cobrança.
Exemplos
O seguinte exemplo de código mostra como obter um HttpHandlerAction índice de coleção 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)
Observações
Antes de usar este método, deve identificar um HttpHandlerAction objeto com o nome e tipo próprios. Pode então usar este objeto para obter o seu índice de coleção.