Share via


WebTestResponse.StatusCode Property

Gets the status of the response.

Namespace:  Microsoft.VisualStudio.TestTools.WebTesting
Assembly:  Microsoft.VisualStudio.QualityTools.WebTestFramework (in Microsoft.VisualStudio.QualityTools.WebTestFramework.dll)

Syntax

'Declaration
Public Property StatusCode As HttpStatusCode
public HttpStatusCode StatusCode { get; internal set; }
public:
property HttpStatusCode StatusCode {
    HttpStatusCode get ();
    internal: void set (HttpStatusCode value);
}
member StatusCode : HttpStatusCode with get, internal set
function get StatusCode () : HttpStatusCode
internal function set StatusCode (value : HttpStatusCode)

Property Value

Type: System.Net.HttpStatusCode
A HttpStatusCode value.

Exceptions

Exception Condition
ObjectDisposedException

The current instance has been disposed.

Remarks

The StatusCode parameter is a number indicating the status of the HTTP response. The expected values for status are defined in the HttpStatusCode class.

.NET Framework Security

See Also

Reference

WebTestResponse Class

Microsoft.VisualStudio.TestTools.WebTesting Namespace

Other Resources

HTTP