SPWebServiceCollection Class
Represents a collection of SPWebService objects.
System.Object
Microsoft.SharePoint.Administration.SPPersistedObjectCollection<SPWebService>
Microsoft.SharePoint.Administration.SPPersistedChildCollection<SPWebService>
Microsoft.SharePoint.Administration.SPWebServiceCollection
Microsoft.SharePoint.Administration.SPPersistedObjectCollection<SPWebService>
Microsoft.SharePoint.Administration.SPPersistedChildCollection<SPWebService>
Microsoft.SharePoint.Administration.SPWebServiceCollection
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Use the SPWebServiceCollection constructor to return the collection of Web services within the server farm. To create a Web service, use the SPWebService to initialize the Web service object, and use the Add method to add the new object to the collection of Web services within the server farm.
Use an indexer to return a single Web service from the collection. For example, if the collection is assigned to a variable named myWebServices, use myWebServices[index] in C#, or myWebServices(index) in Visual Basic, where index is either the name or the GUID identifying the Web service.