Add Method (String, String)
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Inserts a header with the specified name and value into the collection.
Namespace: System.Net
Assembly: System.Http (in System.Http.dll)
Syntax
'Declaration
Public Sub Add ( _
name As String, _
value As String _
)
public void Add(
string name,
string value
)
public:
void Add(
String^ name,
String^ value
)
member Add :
name:string *
value:string -> unit
public function Add(
name : String,
value : String
)
Parameters
- name
Type: System. . :: . .String
The header to add to the collection.
- value
Type: System. . :: . .String
The content of the header.
Remarks
If the header specified in name does not exist, the Add method inserts a new header into the list of header name/value pairs.
If the header specified in name is already present, value is added to the existing comma-separated list of values associated with name.
.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.