共用方式為


SPServiceInstance.Service property

取得擁有此服務執行個體的服務。

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public ReadOnly Property Service As SPService
    Get
'用途
Dim instance As SPServiceInstance
Dim value As SPService

value = instance.Service
public SPService Service { get; }

Property value

Type: Microsoft.SharePoint.Administration.SPService
表示此服務的SPService物件。

請參閱

參照

SPServiceInstance class

SPServiceInstance members

Microsoft.SharePoint.Administration namespace