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.

傳回

代表 ObjectComponent所提供的服務,或 null 若未 Component 提供指定服務。

備註

此方法可被派生類別覆蓋。

適用於

另請參閱