WebHeaderCollection.Item[String] Property

Definition

Gets or sets the specified header.

Overloads

Item[HttpRequestHeader]

Gets or sets the specified request header.

Item[HttpResponseHeader]

Gets or sets the specified response header.

Item[String]

Item[HttpRequestHeader]

Gets or sets the specified request header.

public:
 property System::String ^ default[System::Net::HttpRequestHeader] { System::String ^ get(System::Net::HttpRequestHeader header); void set(System::Net::HttpRequestHeader header, System::String ^ value); };
public string this[System.Net.HttpRequestHeader header] { get; set; }
member this.Item(System.Net.HttpRequestHeader) : string with get, set
Default Public Property Item(header As HttpRequestHeader) As String

Parameters

header
HttpRequestHeader

The request header value.

Property Value

A String instance containing the specified header value.

Exceptions

This WebHeaderCollection instance does not allow instances of HttpRequestHeader.

Item[HttpResponseHeader]

Gets or sets the specified response header.

public:
 property System::String ^ default[System::Net::HttpResponseHeader] { System::String ^ get(System::Net::HttpResponseHeader header); void set(System::Net::HttpResponseHeader header, System::String ^ value); };
public string this[System.Net.HttpResponseHeader header] { get; set; }
member this.Item(System.Net.HttpResponseHeader) : string with get, set
Default Public Property Item(header As HttpResponseHeader) As String

Parameters

header
HttpResponseHeader

The response header value.

Property Value

A String instance containing the specified header.

Exceptions

The length of value is greater than 65535.

This WebHeaderCollection instance does not allow instances of HttpResponseHeader.

Item[String]

public:
 property System::String ^ default[System::String ^] { System::String ^ get(System::String ^ name); void set(System::String ^ name, System::String ^ value); };
public string this[string name] { get; set; }
member this.Item(string) : string with get, set
Default Public Property Item(name As String) As String

Parameters

name
String

Property Value

Applies to