Javatpoint Logo
Javatpoint Logo

F# Structures

F# structure is a data structure which is used to organize data. It is value type and efficient than class. It does not allow let binding. You must declare fields by using val keyword. It allows defining fields but does not allow initialization. You can create constructors, mutable and immutable fields in structure.

Syntax:


F# Structure Example

Here, we have created a Book structure which contains book's details.

Output:

-------------------------Book's Details-------------------------
Title  : FSharp Programming
Author : Chris Smith
Price  : $100.00





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA