Zum Inhalt springen

Named boolean parameter (ARCH709)

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Key dotnet.codequality.named-boolean-parameter · Severity info · Category codequality

Bare true/false arguments at the call site hide what they mean. Named arguments improve readability.

user.SetVisibility(true, false);
user.SetVisibility(isPublic: true, notifyFollowers: false);

Add named-argument syntax to boolean arguments; alternatively use an enum or an options object.