Modifica

Condividi tramite


ServiceDescriptionCollection.Add(ServiceDescription) Method

Definition

Adds the specified ServiceDescription to the end of the 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

Parameters

serviceDescription
ServiceDescription

The ServiceDescription to add to the collection.

Returns

The zero-based index where the ServiceDescription parameter has been added.

Examples

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

Applies to