다음을 통해 공유


ControllerBase.StatusCode 메서드

정의

오버로드

StatusCode(Int32)

statusCode지정하여 StatusCodeResult 개체를 만듭니다.

StatusCode(Int32, Object)

statusCode 지정하여 ObjectResult 개체를 만들고 value

StatusCode(Int32)

Source:
ControllerBase.cs
Source:
ControllerBase.cs
Source:
ControllerBase.cs

statusCode지정하여 StatusCodeResult 개체를 만듭니다.

public:
 virtual Microsoft::AspNetCore::Mvc::StatusCodeResult ^ StatusCode(int statusCode);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.StatusCodeResult StatusCode (int statusCode);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member StatusCode : int -> Microsoft.AspNetCore.Mvc.StatusCodeResult
override this.StatusCode : int -> Microsoft.AspNetCore.Mvc.StatusCodeResult
Public Overridable Function StatusCode (statusCode As Integer) As StatusCodeResult

매개 변수

statusCode
Int32

응답에 설정할 상태 코드입니다.

반환

응답에 대해 만든 StatusCodeResult 개체입니다.

특성

적용 대상

StatusCode(Int32, Object)

Source:
ControllerBase.cs
Source:
ControllerBase.cs
Source:
ControllerBase.cs

statusCode 지정하여 ObjectResult 개체를 만들고 value

public:
 virtual Microsoft::AspNetCore::Mvc::ObjectResult ^ StatusCode(int statusCode, System::Object ^ value);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ObjectResult StatusCode (int statusCode, object value);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ObjectResult StatusCode (int statusCode, object? value);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member StatusCode : int * obj -> Microsoft.AspNetCore.Mvc.ObjectResult
override this.StatusCode : int * obj -> Microsoft.AspNetCore.Mvc.ObjectResult
Public Overridable Function StatusCode (statusCode As Integer, value As Object) As ObjectResult

매개 변수

statusCode
Int32

응답에 설정할 상태 코드입니다.

value
Object

ObjectResult설정할 값입니다.

반환

응답에 대해 만든 ObjectResult 개체입니다.

특성

적용 대상