Forked from seankearon/gist:de261ac578de1a735b26f23b0ce78155
Created
March 9, 2018 17:30
-
-
Save lessismore1/3ab86a81dd6f84a51dbcba49b2ba428e to your computer and use it in GitHub Desktop.
F# record implementing an interface
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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