다음을 통해 공유


HttpResponseMessageProperty.StatusCode Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets the status code of the current HTTP response to which this property is attached.

Namespace:  System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

Syntax

'Declaration
Public Property StatusCode As HttpStatusCode
public HttpStatusCode StatusCode { get; set; }

Property Value

Type: System.Net.HttpStatusCode
The HttpStatusCode to send on the HTTP response.

Exceptions

Exception Condition
ArgumentOutOfRangeException

The value is set to less than 100 or greater than 599.

Remarks

This property has one of the values in the HttpStatusCode enumeration.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.