共用方式為


SPWebApplication.Sites property

取得 Web 應用程式中的所有網站集合。

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

Syntax

'宣告
Public ReadOnly Property Sites As SPSiteCollection
    Get
'用途
Dim instance As SPWebApplication
Dim value As SPSiteCollection

value = instance.Sites
public SPSiteCollection Sites { get; }

Property value

Type: Microsoft.SharePoint.Administration.SPSiteCollection
SPSiteCollection 物件,代表集合的網站集合。

請參閱

參照

SPWebApplication class

SPWebApplication members

Microsoft.SharePoint.Administration namespace