I frequently write a Console.WriteLine statement and then modify it at a later stage. I then end up with statements such as this.
Console.WriteLine("{2} is not greater than {0} or smaller than {1}",min,max, grade);
Is there a way to explicitly name the parameters being passed to the Console.WriteLine, so that I do not need to pass min, max and grade in the order?
As a related note, I often remove variables to be printed in Console.WriteLine, such as below, where {2} has been removed.
Console.WriteLine("{3} is not greater than {0} or smaller than {1}",min,max, grade);
Is there a way to not change the numbering and say something like:
Console.WriteLine("{3} is not greater than {0} or smaller than {1}",{0}:min,{1}:max, {3}: grade);
in a similar way to statements like this
@Html.ActionLink("Your profile", "Index", "Manage", routeValues: null, htmlAttributes: new { title = "Manage" });
$"{grade} is not greater..."
. – Raouf