A constructor creates an instance and initializes its values. In F#, a class constructor is declared alongside the type and its parameters are available to the class members. section 15.2.1
F# also lets you use a class constructor like a function: passing an argument to FileInfo returns a FileInfo object. The concise form is idiomatic F#; the explicit new form remains valid. section 11.1.1
Constructing a .NET object
open System.IO let fileInfo = FileInfo __SOURCE_FILE__ let explicitFileInfo = new FileInfo(__SOURCE_FILE__) Both expressions construct a FileInfo value. The first emphasizes the constructor's function-like use; the second makes object construction explicit. section 11.1.1
Constructing a C# class from F#
open CsCode let person = Person () printfn $"{person.Name} is {person.Age} years old!" The Person constructor initializes Name to Tamara and Age to 21, after which F# accesses the initialized properties. section 11.1.1












