Keeping an F# console window open

I’m starting out in F# 3.0 and playing with a console app. Annoyingly the window keeps closing but on various videos it’s still open.

To get round this (like in a C# console app) you need to read from the input.

Like so

System.Console.ReadLine() |> ignore

This will wait until we enter something from the console and then ignore the result.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.