Export (0) Print
Expand All

Component.GetService Method

Returns an object that represents a service provided by the Component or by its Container.

[Visual Basic]
Protected Overridable Function GetService( _
   ByVal service As Type _
) As Object
[C#]
protected virtual object GetService(
 Type service
);
[C++]
protected: virtual Object* GetService(
 Type* service
);
[JScript]
protected function GetService(
   service : Type
) : Object;

Parameters

service
A service provided by the Component.

Return Value

An Object that represents a service provided by the Component.

This value is a null reference (Nothing in Visual Basic) if the Component does not provide the specified service.

Remarks

This method can be overridden by a derived class.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Component Class | Component Members | System.ComponentModel Namespace | IContainer | Container | ISite | IServiceProvider

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft