C# language feature:
-
Named and optional arguments
applies to
benefit
- Named arguments are useful in making method calls self-documenting and reduce dependence on a parameter’s position in the parameter list.
how to use
- 1) Named arguments - preceed argument passed with name of parameter and
:
- 2) Options arguments - must come after required arguments, and have default assignments.
example: