Click or drag to resize

WebHeaderCollection Methods

The WebHeaderCollection type exposes the following members.

Methods
  NameDescription
Public methodAdd(String)
Adds the specified header to the collection.
Public methodAdd(HttpRequestHeader, String)
Adds the specified request header with the specified value to the collection.
Public methodAdd(HttpResponseHeader, String)
Adds the specified response header with the specified value to the collection.
Public methodAdd(String, String)
Adds a header with the specified name and value to the collection.
(Overrides NameValueCollectionAdd(String, String).)
Public methodClear
Removes all headers from the collection.
(Overrides NameValueCollectionClear.)
Public methodGet(Int32)
Get the value of the header at the specified index in the collection.
(Overrides NameValueCollectionGet(Int32).)
Public methodGet(String)
Get the value of the header with the specified name in the collection.
(Overrides NameValueCollectionGet(String).)
Public methodGetEnumerator
Gets the enumerator used to iterate through the collection.
(Overrides NameObjectCollectionBaseGetEnumerator.)
Public methodGetKey
Get the name of the header at the specified index in the collection.
(Overrides NameValueCollectionGetKey(Int32).)
Public methodGetObjectData
Populates the specified SerializationInfo with the data needed to serialize the WebHeaderCollection.
(Overrides NameObjectCollectionBaseGetObjectData(SerializationInfo, StreamingContext).)
Public methodGetValues(Int32)
Gets an array of header values stored in the specified index position of the collection.
(Overrides NameValueCollectionGetValues(Int32).)
Public methodGetValues(String)
Gets an array of header values stored in the specified header.
(Overrides NameValueCollectionGetValues(String).)
Public methodStatic memberIsRestricted(String)
Determines whether the specified header can be set for the request.
Public methodStatic memberIsRestricted(String, Boolean)
Determines whether the specified header can be set for the request or the response.
Public methodOnDeserialization
Implements the ISerializable interface and raises the deserialization event when the deserialization is complete.
(Overrides NameObjectCollectionBaseOnDeserialization(Object).)
Public methodRemove(HttpRequestHeader)
Removes the specified request header from the collection.
Public methodRemove(HttpResponseHeader)
Removes the specified response header from the collection.
Public methodRemove(String)
Removes the specified header from the collection.
(Overrides NameValueCollectionRemove(String).)
Public methodSet(HttpRequestHeader, String)
Sets the specified request header to the specified value.
Public methodSet(HttpResponseHeader, String)
Sets the specified response header to the specified value.
Public methodSet(String, String)
Sets the specified header to the specified value.
(Overrides NameValueCollectionSet(String, String).)
Public methodToByteArray
Converts the current WebHeaderCollection to an array of Byte.
Public methodToString
Returns a String that represents the current WebHeaderCollection.
(Overrides ObjectToString.)
Top
See Also