Skip to content

Instantly share code, notes, and snippets.

@robertpi
Created June 21, 2012 09:18
Show Gist options
  • Star 27 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save robertpi/2964793 to your computer and use it in GitHub Desktop.
Save robertpi/2964793 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
@amatiasq
Copy link

Thanks

@christeropda
Copy link

Thumbs up !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment