SIGN UP MEMBER LOGIN:    
ARTICLE

Hello World Program in F#

Posted by Dhananjay Kumar Articles | F# June 11, 2010
This is very basic article, which will give demonstration on how to write first F# program.
Reader Level:

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. 

Login to add your contents and source code to this article
share this article :
post comment
 

hi..... i am new in F#.
Whenever, i run the program, the output window is closed immediately....!
how to solve this problem?

Posted by ManiKandan Nov 15, 2010
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
    Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Team Foundation Server Hosting
Become a Sponsor