Gibt es eine Möglichkeit, die Funktionsargumente in einem Konstruktor zu benennen?Gibt es eine Möglichkeit, benannte Argumente für eine Funktion in einem F # -Konstruktor anzugeben?
type UnnamedInCtor(foo: string -> string -> bool) =
member this.Foo: string -> string -> bool = foo
member this.Bar: a:string -> b:string -> bool = foo
member this.Fizz = foo
//Does not compile
type NamedInCtor(foo: a:string -> b:string -> bool) =
member this.Foo: string -> string -> bool = foo
member this.Bar: a:string -> b:string -> bool = foo
member this.Fizz = foo
Haben Sie dies überprüfen. Es kompiliert nicht. –
Natürlich habe ich nicht;) –