Home » F# Object Expressions

F# Object Expressions

by Online Tutorials Library

F# Object Expressions

F# object expression is a special expression. It creates a new instance of anonymous object type which is based on an existing base type, interface, or set of interfaces.

The syntax of Object Expressions in F# language is given below:


F# Object Expression When Type is Class.

In the following example, you can use other predefined and custom class also like System.Object.

Output:

Hello FSharp  

You may also like