C-DEngine 5.105

WebHeaderCollection..::..Add Method (String)

Adds the specified header to the collection.

Namespace:  WebSocketSharp.Net
Assembly:  C-DEngine (in C-DEngine.dll)

Syntax


public void Add(
	string header
)
Public Sub Add ( _
	header As String _
)
public:
void Add(
	String^ header
)

Parameters

header
Type: String
A String that represents the header with the name and value separated by a colon (':').

Exceptions


ExceptionCondition
ArgumentNullExceptionheader is nullNothingnullptra null reference (Nothing in Visual Basic), empty, or the name part of header is empty.
ArgumentException

header doesn't contain a colon.

-or-

header is a restricted header.

-or-

The name or value part of header contains invalid characters.

ArgumentOutOfRangeException The length of the value part of header is greater than 65,535 characters.
InvalidOperationException The current WebHeaderCollection instance doesn't allow the header.