Hello World Program in F#

Objective 

This is very basic article, which will give demonstration on how to write first F# program.

Step 1

Open visual studio 2010 create new F# application by selecting   F# Application project template in Windows tab under Visual F# language category 

1.gif
 
Step 2

In solution explorer, you can see a file Program.fs has been created for you.  

Fs are extension of F# program files. 

2.gif
 
Step 3

When you click on Program.fs, you can see a blank F# editor will be open. 

3.gif
 
Step 4

Print Hello World in F# code in F# editor. 

Program.fs

// Learn more about F# at http://fsharp.net
printfn "Hello World to F# language "

Step 5

Run the F# program by pressing ctrl + F5. You will get the output as below, 

4.gif

Conclusion 

I have shown  in this article, how to write your first F# program. I hope this post was useful. 

Thanks for reading. Happy Coding. 

Up Next
    Ebook Download
    View all
    Learn
    View all