Mono Class Library: System.Net.WebHeaderCollection Overview | MembersSystem.Net.WebHeaderCollection.Set Method |
Sets the specified header to the specified value. [Edit]
|
Type Reason ArgumentNullException name 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.
-or-
value contains invalid characters.
[Edit]
The WebHeaderCollection.Set(string, string) method inserts a new header into the list of header name/value pairs.
If the header specified in name is already present, value replaces the existing value.
Note: This method overrides System.Collections.Specialized.NameValueCollection.Set(string, string).[Edit]
Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0