HttpRequestException.StatusCode Propriedade

Definição

Obtém o código de status HTTP a ser retornado com a exceção.Gets the HTTP status code to be returned with the exception.

public:
 property Nullable<System::Net::HttpStatusCode> StatusCode { Nullable<System::Net::HttpStatusCode> get(); };
public System.Net.HttpStatusCode? StatusCode { get; }
member this.StatusCode : Nullable<System.Net.HttpStatusCode>
Public ReadOnly Property StatusCode As Nullable(Of HttpStatusCode)

Valor da propriedade

Nullable<HttpStatusCode>

Um código de status HTTP se a exceção representa um resultado não bem-sucedido; caso contrário, NULL.An HTTP status code if the exception represents a non-successful result, otherwise null.

Comentários

Esta propriedade foi introduzida no .NET 5,0.This property was introduced in .NET 5.0.

Aplica-se a