TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
C# Coding Standard

Rule:  5@120Checked automatically with code checker

This rule is Obsolete
Synopsis:Avoid using named arguments
Severity Level:4
Category:Object lifecycle


C# 4.0's named arguments have been introduced to make it easier to call COM components that are known for offering tons of 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.

The only exception where named arguments improve readability is when a constructor that yields a valid object is called like this:

Person person = new Person
    firstName: "John",
    lastName: "Smith",
    dateOfBirth: new DateTime(1970, 1, 1)

Literature References:
Aviva AV1555