Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 1.1
.NET Framework
Reference
Class Library
Component Class
Methods
 GetService Method
This page is specific to
Microsoft Visual Studio 2003/.NET Framework 1.1

Other versions are also available for the following:
.NET Framework Class Library
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

© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker