Do you work with .NET Core updates?
Take a quick survey to help us improve your experience with acquiring .NET Core updates.

F# Tutorial - Hello World in 10 minutes

Write some code

Open Program.fs in any text editor, and replace all of the code with the following. If you want to, you can replace the name Ana with your name.

Program.fs
open System

// Define a new function to print a name.
// It is defined above the main function.
let printGreeting name =
    printfn "Hello %s from F#!" name

[<EntryPoint>]
let main argv =
    // Call your new function!
    printGreeting "Ana"
    0 // return an integer exit code

Save the Program.fs file, and run your code again.

Command prompt
dotnet run
Continue