Google News
logo
F# - Interview Questions
What is a constructor in F#?
In F#, Constructor is somewhat different than other .Net languages. There are always primary constructors that may or may not have parameters. The Scope of these parameters is throughout the class.
 
Example :
type Employee(name) =   
 class  
  do printf "%s" name  
 end  
let e = new Employee("FSharp")
Advertisement