WebHeaderCollection.Remove Method (HttpRequestHeader)

 

Removes the specified header from the collection.

Namespace:   System.Net
Assembly:  System (in System.dll)

public void Remove(
	HttpRequestHeader header
)

Parameters

header
Type: System.Net.HttpRequestHeader

The HttpRequestHeader instance to remove from the collection.

Exception Condition
InvalidOperationException

This WebHeaderCollection instance does not allow instances of HttpRequestHeader.

Remove deletes the specified header from the collection. If the specified header does not exist, the method does nothing.

.NET Framework
Available since 2.0
Return to top
Show: