WebHeaderCollection.Item[] 속성

정의

지정된 헤더를 가져오거나 설정합니다.

오버로드

Item[HttpRequestHeader]

지정된 요청 헤더를 가져오거나 설정합니다.

Item[HttpResponseHeader]

지정된 응답 헤더를 가져오거나 설정합니다.

Item[String]

Item[HttpRequestHeader]

Source:
WebHeaderCollection.cs
Source:
WebHeaderCollection.cs
Source:
WebHeaderCollection.cs

지정된 요청 헤더를 가져오거나 설정합니다.

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

매개 변수

header
HttpRequestHeader

요청 헤더 값입니다.

속성 값

지정된 헤더 값을 포함하는 String 인스턴스입니다.

예외

WebHeaderCollection 인스턴스에서 HttpRequestHeader의 인스턴스를 사용할 수 없는 경우

적용 대상

Item[HttpResponseHeader]

Source:
WebHeaderCollection.cs
Source:
WebHeaderCollection.cs
Source:
WebHeaderCollection.cs

지정된 응답 헤더를 가져오거나 설정합니다.

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

매개 변수

header
HttpResponseHeader

응답 헤더 값입니다.

속성 값

지정된 헤더를 포함하는 String 인스턴스입니다.

예외

.NET Framework 및 .NET Core 버전 2.0 - 3.1만 해당: value의 길이가 65,535자를 넘는 경우

WebHeaderCollection 인스턴스에서 HttpResponseHeader의 인스턴스를 사용할 수 없는 경우

설명

참고

value 길이는 .NET Framework 및 .NET Core 버전 2.0 - 3.1에서만 유효성이 검사됩니다.

적용 대상

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

매개 변수

name
String

속성 값

적용 대상