IServiceContainer::RemoveService Method (Type^, Boolean)

 

Removes the specified service type from the service container, and optionally promotes the service to parent service containers.

Namespace:   System.ComponentModel.Design
Assembly:  System (in System.dll)

void RemoveService(
	Type^ serviceType,
	bool promote
)

Parameters

serviceType
Type: System::Type^

The type of service to remove.

promote
Type: System::Boolean

true to promote this request to any parent service containers; otherwise, false.

The following example demonstrates how to remove a service from an IServiceContainer.

m_MyServiceContainer->RemoveService( Control::typeid );

.NET Framework
Available since 1.1
Return to top
Show: