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)

public:
int FindIndex(
	Type^ serviceType,
	Predicate<Object^>^ match
)

Parameters

serviceType
Type: System::Type^

The service type.

match
Type: System::Predicate<Object^>^

The delegate that defines the conditions of the element to search for.

Return Value

Type: System::Int32

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

Return to top
Show: