WebHeaderCollection.Remove Method (HttpRequestHeader)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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: