Component.GetService(Type) 方法

定义

返回一个对象,该对象表示服务由 Component 或其 Container提供的服务。

protected:
 virtual System::Object ^ GetService(Type ^ service);
protected virtual object GetService(Type service);
abstract member GetService : Type -> obj
override this.GetService : Type -> obj
Protected Overridable Function GetService (service As Type) As Object

参数

service
Type

由 . Component.

返回

Object 个表示由指定 Component服务提供的服务,或者 null 如果未 Component 提供指定的服务。

注解

此方法可由派生类重写。

适用于

另请参阅