共用方式為


GlobalObjectProvider.GetService(Type) Method

Definition

Gets the requested service.

protected:
 System::Object ^ GetService(Type ^ serviceType);
protected:
 Platform::Object ^ GetService(Platform::Type ^ serviceType);
protected object GetService (Type serviceType);
member this.GetService : Type -> obj
Protected Function GetService (serviceType As Type) As Object

Parameters

serviceType
Type

The Type of service to retrieve

Returns

An Object that represents an instance of the requested service; otherwise, null if no such service exists.

Exceptions

serviceType is null.

Applies to