共用方式為


SPServerCollection class

代表SPServer物件的集合。

Inheritance hierarchy

System.Object
  Microsoft.SharePoint.Administration.SPPersistedObjectCollection<SPServer>
    Microsoft.SharePoint.Administration.SPPersistedChildCollection<SPServer>
      Microsoft.SharePoint.Administration.SPServerCollection

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

Syntax

'宣告
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public NotInheritable Class SPServerCollection _
    Inherits SPPersistedChildCollection(Of SPServer)
'用途
Dim instance As SPServerCollection
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public sealed class SPServerCollection : SPPersistedChildCollection<SPServer>

備註

若要取得指定之的伺服器陣列中所用的集合中的伺服器使用ServersSPFarm類別屬性,或是SPServerCollection建構函式。

若要從集合中傳回單一伺服器使用索引器。例如,若集合已指派給變數myServers,使用myServers[index]以 C# 或 Visual Basic,其中index是 GUID 或名稱識別服務中的myServers(index) 。

Thread safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

請參閱

參照

SPServerCollection members

Microsoft.SharePoint.Administration namespace