Try .NET on Azure for free
Get started with 12 months of free services and build .NET cloud apps with your Azure free account.

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