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
- name
Type: System. . :: . .String
The header to set.
- value
Type: System. . :: . .String
The content of the header to set.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.