是否可以转发可选参数,例如:
type Type() =
member this.A(?param) = printfn "%d" <| defaultArg param 0
member this.B(?param) = this.A(param) // how to do this ?
答案 0 :(得分:4)
像这样:
member this.B(?param) = this.A(?param = param)
在提供命名的可选参数时使用?
可以传递选项。