共用方式為


HttpResponseMessage.StatusCode 屬性

定義

取得或設定 HTTP 回應的狀態碼。

public:
 property HttpStatusCode StatusCode { HttpStatusCode get(); void set(HttpStatusCode value); };
HttpStatusCode StatusCode();

void StatusCode(HttpStatusCode value);
public HttpStatusCode StatusCode { get; set; }
var httpStatusCode = httpResponseMessage.statusCode;
httpResponseMessage.statusCode = httpStatusCode;
Public Property StatusCode As HttpStatusCode

屬性值

HTTP 回應的狀態碼。

適用於

另請參閱