Share via


WebHeaderCollection.Add Method (String, String)

Inserts a header with the specified name and value into the collection.

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

Syntax

public void Add (
         stringname,
         stringvalue
)

Parameters

  • name
    The name of the header that is being added to the collection.
  • value
    The content of the header that is being added (its header-value). If a header with the specified name already exists, this value is concatenated onto the existing header.

Remarks

If a header with the specified name already exists, the header that is being added is concatenated onto the existing header.

Throws an exception if the specified header name is the name of a special header.

Version Information

Available in the .NET Micro Framework versions 4.0 and 4.1.

See Also

Reference

WebHeaderCollection Class
WebHeaderCollection Members
System.Net Namespace