Last active
February 11, 2020 22:41
-
-
Save ohlawdie/ccdfd4a645de7549d8232bbb7ba6eee1 to your computer and use it in GitHub Desktop.
Method Syntaxes F# #FSharp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Instance method definition. | |
| [ attributes ] | |
| member [inline] self-identifier.method-name parameter-list [ : return-type ] = | |
| method-body | |
| // Static method definition. | |
| [ attributes ] | |
| static member [inline] method-name parameter-list [ : return-type ] = | |
| method-body | |
| // Abstract method declaration or virtual dispatch slot. | |
| [ attributes ] | |
| abstract member method-name : type-signature | |
| // Virtual method declaration and default implementation. | |
| [ attributes ] | |
| abstract member method-name : type-signature | |
| [ attributes ] | |
| default self-identifier.method-name parameter-list [ : return-type ] = | |
| method-body | |
| // Override of inherited virtual method. | |
| [ attributes ] | |
| override self-identifier.method-name parameter-list [ : return-type ] = | |
| method-body | |
| // Optional and DefaultParameterValue attributes on input parameters | |
| [ attributes ] | |
| [ modifier ] member [inline] self-identifier.method-name ([<Optional; DefaultParameterValue( default-value )>] input) [ : return-type ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment