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

System.Net.WebHeaderCollection.Remove Method

Removes the specified header from the current instance. [Edit]

public override void Remove (string name)

Parameters

name
A string that contains the name of the header to remove from the current instance. [Edit]

Exceptions

TypeReason
ArgumentNullExceptionname is null or string.Empty. [Edit]
ArgumentException

name contains invalid characters.

-or-

name is a protected header that can only be set with a property accessor or by the system.

[Edit]

Remarks

This method deletes the specified header from the current instance. If multiple values were added to the same header using WebHeaderCollection.Add(string, string), a single call to WebHeaderCollection.Remove(string) deletes all of the values.

Note: This method overrides System.Collections.Specialized.NameValueCollection.Remove(string).

[Edit]

Requirements

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