SoapHeaderCollection.Insert(Int32, SoapHeader) 메서드

정의

지정된 인덱스에 삽입 SoapHeaderSoapHeaderCollection 합니다.

public:
 void Insert(int index, System::Web::Services::Protocols::SoapHeader ^ header);
public void Insert(int index, System.Web.Services.Protocols.SoapHeader header);
member this.Insert : int * System.Web.Services.Protocols.SoapHeader -> unit
Public Sub Insert (index As Integer, header As SoapHeader)

매개 변수

index
Int32

에 삽입 SoapHeader 할 인덱스(0부터 시작하는 인덱스)입니다 SoapHeaderCollection.

header
SoapHeader

SoapHeader 에 삽입할 항목입니다SoapHeaderCollection.

예외

매개 변수가 index .의 유효한 인덱스가 SoapHeaderCollection아닙니다.

예제

mySoapHeader = gcnew MySoapHeader;
mySoapHeader->text = "This header is inserted before the first header";
mySoapHeaderCollection->Insert( 0, mySoapHeader );
mySoapHeader = new MySoapHeader();
mySoapHeader.text = "This header is inserted before the first header";
mySoapHeaderCollection.Insert(0, mySoapHeader);
mySoapHeader = New MySoapHeader()
mySoapHeader.text = "This header is inserted before the first header"
mySoapHeaderCollection.Insert(0, mySoapHeader)

설명

매개 변수가 index 컬렉션의 항목 수와 같으면 컬렉션 SoapHeader 의 끝에 추가됩니다.

SoapHeader 삽입 지점 뒤의 요소는 새 요소를 수용하기 위해 아래로 이동합니다.

적용 대상

추가 정보