WebHeaderCollection.Item[] Właściwość

Definicja

Pobiera lub ustawia określony nagłówek.

Przeciążenia

Item[HttpRequestHeader]

Pobiera lub ustawia określony nagłówek żądania.

Item[HttpResponseHeader]

Pobiera lub ustawia określony nagłówek odpowiedzi.

Item[String]

Item[HttpRequestHeader]

Źródło:
WebHeaderCollection.cs
Źródło:
WebHeaderCollection.cs
Źródło:
WebHeaderCollection.cs

Pobiera lub ustawia określony nagłówek żądania.

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; }
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

Parametry

header
HttpRequestHeader

Wartość nagłówka żądania.

Wartość właściwości

Wystąpienie String zawierające określoną wartość nagłówka.

Wyjątki

To WebHeaderCollection wystąpienie nie zezwala na wystąpienia programu HttpRequestHeader.

Dotyczy

Item[HttpResponseHeader]

Źródło:
WebHeaderCollection.cs
Źródło:
WebHeaderCollection.cs
Źródło:
WebHeaderCollection.cs

Pobiera lub ustawia określony nagłówek odpowiedzi.

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; }
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

Parametry

header
HttpResponseHeader

Wartość nagłówka odpowiedzi.

Wartość właściwości

Wystąpienie String zawierające określony nagłówek.

Wyjątki

.NET Framework i .NET Core w wersji 2.0 – 3.1: długość value jest większa niż 65535.

To WebHeaderCollection wystąpienie nie zezwala na wystąpienia programu HttpResponseHeader.

Uwagi

Uwaga

Długość value wartości jest weryfikowana tylko w .NET Framework i .NET Core w wersji 2.0–3.1.

Dotyczy

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

Parametry

name
String

Wartość właściwości

Dotyczy