System.Net.WebHeaderCollection Members

The members of System.Net.WebHeaderCollection are listed below.

See Also: Inherited members from System.Collections.Specialized.NameValueCollection

Public Constructors

Initializes a new instance of the System.Net.WebHeaderCollection class.

Protected Constructors

Public Properties

[read-only]
override
AllKeysstring[].

Gets all header names (keys) in the collection.

[read-only]
override
Countint.

Gets the number of headers in the collection.

default property
Item(HttpRequestHeader)string. Documentation for this section has not yet been entered.
default property
Item(HttpResponseHeader)string. Documentation for this section has not yet been entered.
[read-only]
override
KeysSystem.Collections.Specialized.NameObjectCollectionBase.KeysCollection.

Gets the collection of header names (keys) in the collection.

Public Methods

Add(string)

Inserts the specified header into the collection.

Add(HttpRequestHeader, string)

Inserts the specified header with the specified value into the collection.

Add(HttpResponseHeader, string)

Inserts the specified header with the specified value into the collection.

override
Add(string, string)

Inserts a header with the specified name and value into the collection.

override
Clear()

Removes all headers from the collection.

override
Get(int) : string

Get the value of a particular header in the collection, specified by an index into the collection.

override
Get(string) : string

Get the value of a particular header in the collection, specified by the name of the header.

override
GetEnumerator() : IEnumerator

Returns an enumerator that can iterate through the System.Net.WebHeaderCollection instance.

override
GetKey(int) : string

Get the header name at the specified position in the collection.

override
GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)

Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.

override
GetValues(int) : string[]

Gets an array of header values stored in the index position of the header collection.

override
GetValues(string) : string[]

Gets an array of header values stored in a header.

static
IsRestricted(string) : bool

Tests whether the specified HTTP header can be set for the request.

static
IsRestricted(string, bool) : bool

Tests whether the specified HTTP header can be set for the request or the response.

override
OnDeserialization(object)

Implements the System.Runtime.Serialization.ISerializable interface and raises the deserialization event when the deserialization is complete.

Remove(HttpRequestHeader)

Removes the specified header from the collection.

Remove(HttpResponseHeader)

Removes the specified header from the collection.

override
Remove(string)

Removes the specified header from the collection.

Set(HttpRequestHeader, string)

Sets the specified header to the specified value.

Set(HttpResponseHeader, string)

Sets the specified header to the specified value.

override
Set(string, string)

Sets the specified header to the specified value.

ToByteArray() : byte[]

Converts the System.Net.WebHeaderCollection to a byte array..

override
ToString() : string

This method is obsolete.

Protected Methods

AddWithoutValidate(string, string)

Inserts a header into the collection without checking whether the header is on the restricted header list.

Explicitly Implemented Interface Members