MenuCommandService.GetService(Type) 方法

定义

获取对所请求服务的引用。

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

参数

serviceType
Type

要检索的服务的 Type

返回

serviceType 的引用;如果找不到服务,则为 null

例外

serviceTypenull

适用于

另请参阅