f# - 如何定义包含名为“类型”的字段的记录?
问题描述
有没有办法定义包含“类型”字段的记录?例如 :
type ProjectType=
| ObjectDetection
| Classification
type Domain = {
name:string;
type: ProjectType; // How can I achieve this ?
enabled:bool;
}
解决方案
推荐阅读
- scala - 从火花数据框中的另一列替换一列的值
- python - 堆叠热图 - seaborn 解决方案?
- c - MBEDTLS_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED
- uninstallation - 卸载cmder的问题
- javascript - 在 MVC 中使用 ajax 和 jquery 发布方法
- php - Google 日历有一个活动被卡住且无法删除
- java - 终端:IOException:Exec_tty 错误:未知原因
- ios - 将我的 uipickerview 当前选择的内容打印到控制台?
- angularjs - ChartJS:将 x 轴月份翻译成其他语言
- c# - 当您冒充并且没有邮箱时如何发送带有附件的电子邮件