Share via


ServicesContainer.FindIndex Method (Type, Predicate<Object>)

 

Searches for a service that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence.

Namespace:   System.Web.Http.Controllers
Assembly:  System.Web.Http (in System.Web.Http.dll)

Syntax

public int FindIndex(
    Type serviceType,
    Predicate<object> match
)
public:
int FindIndex(
    Type^ serviceType,
    Predicate<Object^>^ match
)
member FindIndex : 
        serviceType:Type *
        match:Predicate<Object> -> int
Public Function FindIndex (
    serviceType As Type,
    match As Predicate(Of Object)
) As Integer

Parameters

Return Value

Type: System.Int32

The zero-based index of the first occurrence, if found; otherwise, -1.

See Also

ServicesContainer Class
System.Web.Http.Controllers Namespace

Return to top