Skip to content

Instantly share code, notes, and snippets.

@s952163
Forked from robertpi/gist:2964793
Created July 13, 2017 14:56
Show Gist options
  • Save s952163/4c3dc427f40fcf3f918d33b5e4d322a1 to your computer and use it in GitHub Desktop.
Save s952163/4c3dc427f40fcf3f918d33b5e4d322a1 to your computer and use it in GitHub Desktop.
F# record implementing an interface
namespace MyNamespace
type IMyInterface =
abstract GetValue: unit -> string
type MyRecord =
{ MyField1: int
MyField2: string }
interface IMyInterface with
member x.GetValue() = x.MyField2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment