Partager via


ApiController.StatusCode Method (HttpStatusCode)

 

Creates a T:System.Web.Http.StatusCodeResult with the specified status code.

Namespace:   System.Web.Http
Assembly:  System.Web.Http (in System.Web.Http.dll)

Syntax

protected internal virtual StatusCodeResult StatusCode(
    HttpStatusCode status
)
public protected:
virtual StatusCodeResult^ StatusCode(
    HttpStatusCode status
)
abstract StatusCode : 
        status:HttpStatusCode -> StatusCodeResult
override StatusCode : 
        status:HttpStatusCode -> StatusCodeResult
Protected Friend Overridable Function StatusCode (
    status As HttpStatusCode
) As StatusCodeResult

Parameters

Return Value

Type: System.Web.Http.Results.StatusCodeResult

A T:System.Web.Http.StatusCodeResult with the specified status code.

See Also

ApiController Class
System.Web.Http Namespace

Return to top