Mono Class Library: System.Net.WebHeaderCollection Overview | Members

System.Net.WebHeaderCollection.AddWithoutValidate Method

Inserts a header into the current instance without checking whether the header is on the restricted header list. [Edit]

protected void AddWithoutValidate (string headerName, string headerValue)

Parameters

headerName
A string that contains the name of the header to add to the collection. [Edit]
headerValue
A string that contains the content of the header. [Edit]

Exceptions

TypeReason
ArgumentException

headerName is null or string.Empty, or contains invalid characters.

-or-

headerValue contains invalid characters.

[Edit]

Remarks

This method adds a header to the collection without checking whether the header is on the restricted header list.

Note: When subclassing System.Net.WebHeaderCollection, use the WebHeaderCollection.AddWithoutValidate(string, string) method to add headers that are normally exposed through property accessors.

[Edit]

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0