Created
November 27, 2013 17:22
-
-
Save dmitry-a-morozov/7679567 to your computer and use it in GitHub Desktop.
Why out ref will be an issue
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 Test | |
type MyType = | |
static member AsyncWithRefParams(i : int byref) = | |
async { | |
i <- 5 | |
} | |
module Program = | |
[<EntryPoint>] | |
let main _ = | |
let result = ref 0 | |
MyType.AsyncWithRefParams(result) |> Async.RunSynchronously | |
printfn "Result: %A" result.Value | |
0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment