它是 C# 和 F# 之间的互操作
在 F# 中,
type test =
{
value: int
}
type Wrapper (value: test) =
member val Value = value with get, set
let trythis = new Wrapper(null) // error as expected
然而,在 C#
var trythis = new Wrapper(null); //this runs fine