SoapHeaderCollection::Insert Method (Int32, SoapHeader^)
.NET Framework (current version)
Inserts a SoapHeader into the SoapHeaderCollection at the specified index.
Assembly: System.Web.Services (in System.Web.Services.dll)
Parameters
- index
-
Type:
System::Int32
The zero-based index at which to insert the SoapHeader into the SoapHeaderCollection.
- header
-
Type:
System.Web.Services.Protocols::SoapHeader^
The SoapHeader to insert into the SoapHeaderCollection.
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | The index parameteris not a valid index in the SoapHeaderCollection. |
If the index parameter equals the number of items in the collection, then the SoapHeader is appended to the end of the collection.
The SoapHeader elements after the insertion point move down to accommodate the new element.
.NET Framework
Available since 1.1
Available since 1.1
Show: