System.Net.WebHeaderCollection: Method Members

The methods of System.Net.WebHeaderCollection are listed below. For a list of all members, see the WebHeaderCollection Members list.

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

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.