是什么让第一次实施KO?
type IToto =
abstract Toto : unit -> unit
{ new IToto with
member this.Toto =
fun () -> () }
{ new IToto with
member this.Toto () = () }
Run Code Online (Sandbox Code Playgroud)
在编译表示中,编译为的函数类型的属性与编译为的FSharpFunc<unit, unit> Toto { get; }单元和返回单元的方法之间存在差异unit Toto().
第一个对象表达式实现了不同的接口:
type IToto =
abstract Toto : (unit -> unit) // Note: Parentheses around the function type!
{ new IToto with
member this.Toto =
fun () -> () }
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
107 次 |
| 最近记录: |