SoapHeaderCollection.Item Property
Gets or sets the SoapHeader at the specified index of the SoapHeaderCollection.
[C#] In C#, this property is the indexer for the SoapHeaderCollection class.
[Visual Basic] Public Default Property Item( _ ByVal index As Integer _ ) As SoapHeader [C#] public SoapHeader this[ int index ] {get; set;} [C++] public: __property SoapHeader* get_Item( int index ); public: __property void set_Item( int index, SoapHeader* ); [JScript] returnValue = SoapHeaderCollectionObject.Item(index); SoapHeaderCollectionObject.Item(index) = returnValue; -or- returnValue = SoapHeaderCollectionObject(index); SoapHeaderCollectionObject(index) = returnValue;
[JScript] In JScript, you can use the default indexed properties defined by a type, but you cannot explicitly define your own. However, specifying the expando attribute on a class automatically provides a default indexed property whose type is Object and whose index type is String.
Arguments [JScript]
- index
- The zero-based index of the SoapHeader to get or set.
Parameters [Visual Basic, C#, C++]
- index
- The zero-based index of the SoapHeader to get or set.
Property Value
The SoapHeader at the specified index.
Exceptions
| Exception Type | Condition |
|---|---|
| ArgumentOutOfRangeException | The index parameteris not a valid index in the SoapHeaderCollection. |
Remarks
This property provides the ability to access a specific element in the collection by using the following syntax: myCollection[index].
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also
SoapHeaderCollection Class | SoapHeaderCollection Members | System.Web.Services.Protocols Namespace