No argument names in abstract declaration?
What about: abstract member createEmployee : firstName:string -> lastName:string -> Employee ?
What about: abstract member createEmployee : firstName:string -> lastName:string -> Employee ?
As far as I know, F# doesn’t have any built-in operator equivalent to C# as so you need to write some more complicated expression. Alternatively to your code using match, you could also use if, because the operator 😕 can be use in the same way as is in C#: let res = if (inputValue … Read more
This should work: typedefof<System.IEnumerable<_>> EDIT As Tomas notes, there’s nothing special about the _ wildcard here; F# infers that the type obj is the most general applicable type in this context, so this is the same as using typedefof<System.IEnumerable<obj>>. In some cases the way this works can be a bit of a hindrance, though. For … Read more
I found this in a blog: “What does this C# code look like in F#? (part one: expressions and statements)” C# has an operator called “default” that returns the zero-initialization value of a given type: default(int) It has limited utility; most commonly you may use default(T) in a generic. F# has a similar construct as … Read more