HttpRequestException.StatusCode Property

Definition

Gets the HTTP status code to be returned with the exception.

C#
public System.Net.HttpStatusCode? StatusCode { get; }

Property Value

An HTTP status code if the exception represents a non-successful result, otherwise null.

Applies to

Produk Versi
.NET 5, 6, 7, 8, 9, 10