1555.md

February 3, 2022 ยท View on GitHub

C# 4.0's named arguments have been introduced to make it easier to call COM components that are known for offering many optional parameters. If you need named arguments to improve the readability of the call to a method, that method is probably doing too much and should be refactored.

Exception: The only exception where named arguments improve readability is when calling a method of some code base you don't control that has a bool parameter, like this:

object[] myAttributes = type.GetCustomAttributes(typeof(MyAttribute), inherit: false);