System.IServiceProvider Interface

Assembly: Mscorlib.dll
Namespace: System
Summary
Defines a mechanism for retrieving a service object; that is, an object that provides custom support to other objects.
C# Syntax:
public interface IServiceProvider
Remarks
This interface is implemented by a class or value type that provides a service to other objects.

The IServiceProvider.GetService method of this interface obtains the object that provides the service.

See also:
System Namespace | Type

System.IServiceProvider Member List:

Public Methods
GetService Gets the service object of the specified type.

System.IServiceProvider Member Details

Method: GetService(
   Type serviceType
)
Summary
Gets the service object of the specified type.
C# Syntax:
object GetService(
   Type serviceType
);
Parameters:

serviceType

An object that specifies the type of service object to get. An object that specifies the type of service object to get.

Return Value:
A service object of type serviceType.

-or-

null if there is no service object of type serviceType.

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.