다음을 통해 공유


ServiceDescriptionCollection.Add(ServiceDescription) 메서드

정의

지정된 ServiceDescriptionServiceDescriptionCollection 끝에 추가합니다.

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

매개 변수

serviceDescription
ServiceDescription

컬렉션에 추가할 ServiceDescription입니다.

반환

Int32

ServiceDescription 매개 변수가 추가된 위치의 인덱스(0부터 시작)입니다.

예제

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

적용 대상