Created
September 13, 2012 20:31
-
-
Save dungpa/3717390 to your computer and use it in GitHub Desktop.
Common mistake
This file contains hidden or 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
type Example() = | |
member __.Getter = doComputation() | |
// It's clearer if you use the long syntax: | |
type Example() = | |
member __.Getter with get() = doComputation() | |
// What you probably wanted to do is: | |
type Example() = | |
let result = doComputation() | |
member __.Getter = result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment