return new HttpStatusCodeResult(HttpStatusCode.BadRequest);//HttpStatusCode statusCode 枚举 // HttpStatusCode.BadRequest = 400,public HttpStatusCodeResult(HttpStatusCode statusCode);//带参的构造函数 HttpStatusCodeResult 构造函数名 public HttpStatusCodeResult(HttpStatusCode statusCode) : this(statusCode, (string) null){ //调用两个参数的构造函数}//传递400,(string)null;public HttpStatusCodeResult(int statusCode, string statusDescription) { this.StatusCode = statusCode; //400 this.StatusDescription = statusDescription; //null 空对象} ///获取 HTTP 状态代码。 ///HTTP 状态代码。 public int StatusCode { get; private set; } ///获取 HTTP 状态说明。 ///HTTP 状态说明。 public string StatusDescription { get; private set; }//返回400界面或者404界面或其他界面