WebHeaderCollection.Remove Method (HttpResponseHeader)

 

Removes the specified header from the collection.

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

public void Remove(
	HttpResponseHeader header
)

Parameters

header
Type: System.Net.HttpResponseHeader

The HttpResponseHeader instance to remove from the collection.

Exception Condition
InvalidOperationException

This WebHeaderCollection instance does not allow instances of HttpResponseHeader.

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: