WinSoft.se
Development with focus on VB.NET
Browse: Home / F#

F#

Type inference in F#

By Anders Hesselbom on Aug 29, 10

I have recently been to a short F# presentation at HiQ in Arboga. One of the things that got mentioned was type inference. Both Visual Basic and C# have type inference in their current version, but F# takes this one step further. This approach will produce two integers in VB when Option Infer is set [...]

Posted in Microsoft .NET | Tagged F# | 1 Response

Tuples

By Anders Hesselbom on Jun 19, 10

Tuples in F# is a list of objects with different types, and the tuple itself is strongly typed. You can imagine a simple class or a structure without having to declare the type. This code creates a tuple called myTuple that contains a string, and integer, another string and finally a boolean. let myTuple=(“A”, 10, [...]

Posted in Microsoft .NET | Tagged F# | Leave a response

F# functions

By Anders Hesselbom on Sep 1, 09

Functions are declared using the let keyword, followed by a name, a parameter list and a definition. This creates a function that adds to values and returns the result (first line). The two middle lines calls the function. let myFunction x y = x + y let result1 = myFunction 10 20 let result2 = [...]

Posted in Microsoft .NET | Tagged F# | Leave a response

Conditions and iterations in F#

By Anders Hesselbom on Aug 30, 09

Conditions This code will first assign a value to a and b, and print the values out. Thereafter, it will assign a value to c, that depends on the value of a. The value will be 20. Finally, it will print out both a, b and c. let a=1 let b=2 printfn “%d %d” a [...]

Posted in Microsoft .NET | Tagged F# | Leave a response

Using the framework from F#

By Anders Hesselbom on Aug 30, 09

Just by typing the open statement, you can use the .NET Framework, or any other referenced libraries. To access the Console type, just add the following line to your source code: open System This program uses the built-in library function printfn, and then the WriteLine function to write “Hello world” to the screen. printfn “Hello [...]

Posted in Microsoft .NET | Tagged F# | Leave a response

Things to know about F# before getting started and mutable variables

By Anders Hesselbom on Aug 28, 09

F# is a .NET enabled functional programming language that has features that you would expect such a language to have (lists, tuples, pattern matching and so on), as well as the features you would expect from a .NET language such as preemptive multitasking, dynamic linking and Unicode strings. The program starts from the top of [...]

Posted in Microsoft .NET | Tagged F# | Leave a response

F# and PhotoName

By Anders Hesselbom on Aug 26, 09

I have just decided to look in to F#, the new functional .NET language by Microsoft. It installs with Visual Studio 2010, and it can be installed for Visual Studio 9. I use Visual Studio 9 for my everyday work, so I installed it from here (click on the word MSI in the first paragraph [...]

Posted in Microsoft .NET | Tagged F#, PhotoName | Leave a response

Comments

  • ahesselbom on The Genius of Rowan Atkinson
  • JohnHoudi on Think Different – like everybody else
  • ahesselbom on Think Different – like everybody else
  • ahesselbom on Public Service TV and Sean Banan
  • Mahesh Kumar Sanka on Using the DayView control

Search

Navigation

  • Programs
  • .NET Ctrls
  • Download
  • Links
  • Gallery
  • About

Categories

  • General
    • Geeky
    • Personal
    • Programs
    • Science
    • Skeptical movement
  • Microsoft .NET
    • PowerShell
    • Visual Basic 10
    • Visual Basic 8
    • Visual Basic 9
    • Visual Studio 10
    • Visual Studio 11

Blogroll

  • André Henriksson
  • Anna Forss
  • Christofer Löf
  • Dag König
  • Danwei Tran
  • DotNetKicks.com
  • Elegant Code
  • Eric Lippert
  • Fredrik Wall
  • Johan Lindfors
  • Kellabyte
  • Marc Dormey
  • Marcus Ahnve
  • Mikael Deurell
  • Mikael Söderström
  • Robert Folkesson
  • Roger Alsing
  • Scott Guthrie
  • Tess Ferrandez
  • The Code Junkie

Övrigt

  • Radio 1 101,9
  • Radio Houdi
  • Remix.kwed.org
  • Veckans utbrott!

Science and scepticism

  • Camilla Grepe
  • Pharyngula (PZ Myers)
  • Richard Dawkins Foundation
  • Sam Harris

Vetenskap och skepticism

  • Anders Hesselbom
  • Ateism.nu
  • Evolutionsteori.se
  • Orsakverkan
  • Skeptikerpodden
  • Tidningen Bright