F# Interface

Last Updated : 17 Mar 2025

F# provides Interface type. It provides pure abstraction. It is a collection of abstract methods. A Class which implements interface must provide definition for its all methods.

Syntax:


F# Interface Example

In this example we have created an interface and implemented it into a class.

Output:

Id = 100
Name = RajKumar