Javatpoint Logo
Javatpoint Logo

F# Do Bindings

Do binding is used to execute code without defining function or type. You can write independent code by using do bindings in F#.


F# without Do Binding Example

The above program will throw an error because the print statement which is used inside class. It is not allow directly in the class. We can execute the same code with the help of do bindings. Let's see how?


F# with Do Bindings Example

Output:

Hello FSharp
Next TopicF# Type Inference





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