Home » F# Static

F# Static

In F#, static is a keyword. It is used to make static field or static method. Static is not the part of object. It has its own memory space to store static data. It is used to share common properties among objects.


F# Static Example

Output:

101 Rajkumar 8.80 102 john 8.80 

F# Static field Example: Counting Objects

Output:

101 Rajkumar 102 john Object Counter = 2 
Next TopicF# Inheritance

You may also like