【发布时间】:2019-12-20 07:48:37
【问题描述】:
我想通过字符串查找来获取记录中字段的值。
type Test = { example : string }
let test = { example = "this is the value" }
let getByName (s:string) =
???? //something like test.GetByName(s)
【问题讨论】:
-
是的,但你不应该这样做,因为它需要反射,绕过标准的、干净的类型系统部分。
标签: f#