Method Remove
Remove(CustomHttpHeader)
Removes the specified header instance from the collection.
Declaration
public bool Remove(CustomHttpHeader header)
Parameters
Type | Name | Description |
---|---|---|
CustomHttpHeader | header | The CustomHttpHeader instance to remove from the collection. |
Returns
Type | Description |
---|---|
System.Boolean | True if an item was removed from the collection, otherwise false (because it did not exist or was not the same instance). |
Remarks
Only removes the specified header if that instance was in the collection, if another header with the same name exists in the collection it is not removed.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if the |
See Also
Remove(String)
Removes the property with the specified key (Name from the collection.
Declaration
public bool Remove(string headerName)
Parameters
Type | Name | Description |
---|---|---|
System.String | headerName | The name of the CustomHttpHeader instance to remove from the collection. |
Returns
Type | Description |
---|---|
System.Boolean | True if an item was removed from the collection, otherwise false (because no item exists in the collection with that key). |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown if the |