Compartilhar via


ServiceDescriptionCollection.Add(ServiceDescription) Método

Definição

Adiciona o ServiceDescription especificado ao final do ServiceDescriptionCollection.

public:
 int Add(System::Web::Services::Description::ServiceDescription ^ serviceDescription);
public int Add (System.Web.Services.Description.ServiceDescription serviceDescription);
member this.Add : System.Web.Services.Description.ServiceDescription -> int
Public Function Add (serviceDescription As ServiceDescription) As Integer

Parâmetros

serviceDescription
ServiceDescription

O ServiceDescription a adicionar à coleção.

Retornos

Int32

O índice de base zero em que o parâmetro ServiceDescription foi adicionado.

Exemplos

// Create a ServiceDescriptionCollection.
ServiceDescriptionCollection^ myCollection = gcnew ServiceDescriptionCollection;

// Add ServiceDescriptions to the collection.
myCollection->Add( myServiceDescription1 );
myCollection->Add( myServiceDescription2 );
// Create the object of 'ServiceDescriptionCollection' class.
ServiceDescriptionCollection myCollection =
   new ServiceDescriptionCollection();
// Add 'ServiceDescription' objects.
myCollection.Add(myServiceDescription1);
myCollection.Add(myServiceDescription2);
' Create the object of 'ServiceDescriptionCollection' class.
Dim myCollection As New ServiceDescriptionCollection()
' Add 'ServiceDescription' objects. 
myCollection.Add(myServiceDescription1)
myCollection.Add(myServiceDescription2)

Aplica-se a