Share via


Set Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Sets the specified header to the specified value.

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

Syntax

'Declaration
Public Sub Set ( _
    name As String, _
    value As String _
)
public void Set(
    string name,
    string value
)
public:
void Set(
    String^ name, 
    String^ value
)
member Set : 
        name:string * 
        value:string -> unit 
public function Set(
    name : String, 
    value : String
)

Parameters

Remarks

If the header specified in the header does not exist, the Set method inserts a new header into the list of header name/value pairs.

If the header specified in header is already present, value replaces the existing value.

.NET Framework Security

See Also

Reference

WebHeaderCollection Class

System.Net Namespace