共用方式為


OtherExtensions.GetValuesOrNull(HttpHeaders, String) Method

Definition

Gets the values associated with the supplied header name.

public static System.Collections.Generic.IEnumerable<string> GetValuesOrNull (this System.Net.Http.Headers.HttpHeaders headers, string name);
static member GetValuesOrNull : System.Net.Http.Headers.HttpHeaders * string -> seq<string>
<Extension()>
Public Function GetValuesOrNull (headers As HttpHeaders, name As String) As IEnumerable(Of String)

Parameters

headers
HttpHeaders

The collection of HTTP headers and their values.

name
String

The header name whose value to get.

Returns

The values corresponding to the supplied header name, if the name is found in the collection; otherwise, null.

Applies to