HttpHeaders.TryAddWithoutValidation 方法

定義

傳回值,這個值表示新標頭及其值是否已在沒有驗證所提供之資訊的情況下加入至 HttpHeaders 集合。Returns a value that indicates whether a new header and its values were added to the HttpHeaders collection without validating the provided information.

多載

TryAddWithoutValidation(String, IEnumerable<String>)

傳回的值指示指定的標頭及其值是否未驗證提供的資訊便加入 HttpHeaders 集合。Returns a value that indicates whether the specified header and its values were added to the HttpHeaders collection without validating the provided information.

TryAddWithoutValidation(String, String)

傳回的值指示指定的標頭及其值是否未驗證提供的資訊便加入 HttpHeaders 集合。Returns a value that indicates whether the specified header and its value were added to the HttpHeaders collection without validating the provided information.

TryAddWithoutValidation(String, IEnumerable<String>)

傳回的值指示指定的標頭及其值是否未驗證提供的資訊便加入 HttpHeaders 集合。Returns a value that indicates whether the specified header and its values were added to the HttpHeaders collection without validating the provided information.

public:
 bool TryAddWithoutValidation(System::String ^ name, System::Collections::Generic::IEnumerable<System::String ^> ^ values);
public bool TryAddWithoutValidation (string name, System.Collections.Generic.IEnumerable<string> values);
member this.TryAddWithoutValidation : string * seq<string> -> bool
Public Function TryAddWithoutValidation (name As String, values As IEnumerable(Of String)) As Boolean

參數

name
String

要加入至集合的標頭。The header to add to the collection.

values
IEnumerable<String>

標頭的值。The values of the header.

傳回

如果指定的標頭 namevalues 可以加入集合則為 true,否則為 falsetrue if the specified header name and values could be added to the collection; otherwise false.

TryAddWithoutValidation(String, String)

傳回的值指示指定的標頭及其值是否未驗證提供的資訊便加入 HttpHeaders 集合。Returns a value that indicates whether the specified header and its value were added to the HttpHeaders collection without validating the provided information.

public:
 bool TryAddWithoutValidation(System::String ^ name, System::String ^ value);
public bool TryAddWithoutValidation (string name, string value);
member this.TryAddWithoutValidation : string * string -> bool
Public Function TryAddWithoutValidation (name As String, value As String) As Boolean

參數

name
String

要加入至集合的標頭。The header to add to the collection.

value
String

標頭的內容。The content of the header.

傳回

如果指定的標頭 namevalue 可以加入集合則為 true,否則為 falsetrue if the specified header name and value could be added to the collection; otherwise false.

適用於