I don't know if there is anything to do to get ReadKey in F# interactive. The following snippet works fine when compiled in my Visual Studio 2012.

1
2
3
4
5
6
7
[<EntryPoint>]
let main argv = 
    do printfn "Press any key"
    let myKey = System.Console.ReadKey ()
    do printfn "Key value was %d" (int myKey.KeyChar)
    do System.Threading.Thread.Sleep 500
    0 // return an integer exit code

Best regards
Robert

By on 2/15/2013 10:47 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper