C-DEngine 5.105

WebHeaderCollection..::..Set Method (String, String)

Sets the specified header to the specified value.

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

Syntax


public void Set(
	string name,
	string value
)
Public Sub Set ( _
	name As String, _
	value As String _
)
public:
void Set(
	String^ name, 
	String^ value
)

Parameters

name
Type: String
A String that represents the name of the header to set.
value
Type: String
A String that represents the value of the header to set.

Exceptions


ExceptionCondition
ArgumentNullExceptionname is nullNothingnullptra null reference (Nothing in Visual Basic) or empty.
ArgumentException

name or value contains invalid characters.

-or-

name is a restricted header name.

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