Udostępnij za pośrednictwem


ServiceDescriptionCollection.Add(ServiceDescription) Metoda

Definicja

Dodaje określony ServiceDescription element na końcu obiektu 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

Parametry

serviceDescription
ServiceDescription

Element ServiceDescription do dodania do kolekcji.

Zwraca

Indeks oparty na zerze, w którym ServiceDescription dodano parametr.

Przykłady

// 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)

Dotyczy