Javatpoint Logo
Javatpoint Logo

F# Constructor

In F#, constructor is somewhat different than other .Net languages. There are always a primary constructor that may or may not have parameters. Scope of these parameters are throughout the class.

You can create a new additional constructor by using new keyword. Body of constructor must invoke the primary constructor specified at the top of the class declaration.

F# Constructor Example



F# Non-parameterized Constructor


This is non parametrized constructor

F# Parameterized Constructor


100 Rajkumar 25000.00
101 john 26000.00
Next TopicF# Self Identifier

Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA