Replaces all existing services for the given service type with the given service instance. This works for both singular and plural services.
Namespace:  System.Web.Http.Controllers
Assembly:  System.Web.Http (in System.Web.Http.dll)
Syntax
'Declaration
Public Sub Replace ( _
    serviceType As Type, _
    service As Object _
)
'Usage
Dim instance As ServicesContainer 
Dim serviceType As Type 
Dim service As Object
instance.Replace(serviceType, service)
public void Replace(
    Type serviceType,
    Object service
)
public:
void Replace(
    Type^ serviceType, 
    Object^ service
)
member Replace : 
        serviceType:Type * 
        service:Object -> unit
public function Replace(
    serviceType : Type, 
    service : Object
)
Parameters
- serviceType 
 Type: System.Type- The service type. 
- service 
 Type: System.Object- The service instance.