| Start |
|---|
| Argument order is not necessary You can place named arguments in any order you want. Sample Method: Call Sample: Results: |
| Named Arguments can make your code more clear Consider this simple class: Before C# 3.0 it was: you can make this method call even more clear with named arguments: |
| Named arguments and optional paramaters You can combine named arguments with optional parameters. Let see this method: When you want to call this method without set |
| Named Arguments avoids bugs on optional parameters Always use Named Arguments to optional parameters, to avoid potential bugs when the method is modified. The above code compiles and works fine, until the constructor is changed some day like: Best practice to avoid bugs when "someone else in the team" made mistakes: |
Read Article
https://develop.horje.com/learn/1434/reference