Share via


Add Method (String)

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

Inserts the specified header into the collection.

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

Syntax

'Declaration
Public Sub Add ( _
    header As String _
)
public void Add(
    string header
)
public:
void Add(
    String^ header
)
member Add : 
        header:string -> unit 
public function Add(
    header : String
)

Parameters

Remarks

The header parameter must be specified in the format "name:value". If the specified header does not exist in the collection, a new header is added to the collection.

If the header specified in header is already present in the collection, the value part of the header is concatenated with the existing value.

.NET Framework Security

See Also

Reference

WebHeaderCollection Class

Add Overload

System.Net Namespace