Skip to content

Instantly share code, notes, and snippets.

@grishace
Created May 5, 2020 06:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grishace/a8ee55198378eb2fbf58bf7434b11ace to your computer and use it in GitHub Desktop.
Save grishace/a8ee55198378eb2fbf58bf7434b11ace to your computer and use it in GitHub Desktop.
Output parameter as tuple
open System
open System.Runtime.InteropServices
type X() =
static member Outist(x: string, y: int, [<Out>] z: string byref) =
z <- "tuO"
(y, x)
[<EntryPoint>]
let main argv =
let a, z = X.Outist("1", 2)
printfn "%A %s" a z
0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment