Share via


ServicesContainer.GetService Method

Gets a service instance of a specified type.

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

Syntax

'Declaration
Public MustOverride Function GetService ( _
    serviceType As Type _
) As Object
'Usage
Dim instance As ServicesContainer 
Dim serviceType As Type 
Dim returnValue As Object 

returnValue = instance.GetService(serviceType)
public abstract Object GetService(
    Type serviceType
)
public:
virtual Object^ GetService(
    Type^ serviceType
) abstract
abstract GetService : 
        serviceType:Type -> Object
public abstract function GetService(
    serviceType : Type
) : Object

Parameters

Return Value

Type: System.Object

See Also

Reference

ServicesContainer Class

System.Web.Http.Controllers Namespace