How to set argument [<Out>]?
2 answers
Enter a method method with type byref<string>
and attribute [<Out>]
and use a mutable value with the operator address &
as an argument:
open System.Runtime.InteropServices let mutable msg = "abc" let outmsg ([<Out>]message : byref<string>) = message <- "xyz" msg <- "test" outmsg(&msg) msg;; val mutable msg : string = "xyz" val outmsg : byref<string> -> unit
+6