System.Net.HttpWebResponse.StatusCode Property

Gets the status of the response.

Syntax

public virtual HttpStatusCode StatusCode { get; }

Value

A System.Net.HttpStatusCode value.

Exceptions

TypeReason
ObjectDisposedExceptionThe current instance has been disposed.

Remarks

The HttpWebResponse.StatusCode parameter is a number that indicates the status of the HTTP response. The expected values for status are defined in the System.Net.HttpStatusCode class.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0