Introduction to F# (F-Sharp)

Visual Studio 2010 Introduced the F# programming language. The F# programming language is used for functional and Object Oriented Programming.

To create a F# program, open Visual Studio 2010 then select "File" -> "New" -> "Project..." then select Other Languages then select Visual F# and then select F# Application, which is a project for creating a command line F# application.

create new project

Select the F# application type:

f sharp application

Write your logic in the Program.fs file:

f sharp program file

For running the application "select Send To Interactive" or click Alt+Enter:

send to interactive

View the output of the code above in the F# Interactive window:

f sharp program

To view the result in the Console Application window, we need to use System.Console.WriteLine to display the result.

f sharp program code

Output in Console Command window:

program output

Up Next
    Ebook Download
    View all
    Learn
    View all