我正在制作Razor应用程序,我使用HttpClient从PageModel向某个API发出请求。(ApiClient基本上是从HttpClient派生的类 public IndexModel(ApiClientresponse.StatusCode; // If status == BadRequest, redirect to Error.html }如果从API获得400 BadRequest或其他错误
我有一个定义为type abc = bool->int;;的类型,它解释了从bool到int的简单映射。我的问题是,我如何使用这个type abctype Color = Red|Green|Blue|Dark of Color|Light of Color;;
然后我就可以使用像Dark但是现在我似乎不能使用这个新的type abc了。