C# Language Named Arguments Argument order is not necessary

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

You can place named arguments in any order you want.

Sample Method:

public static string Sample(string left, string right)
{
     return string.Join("-",left,right);
}

Call Sample:

Console.WriteLine (Sample(left:"A",right:"B"));
Console.WriteLine (Sample(right:"A",left:"B"));

Results:

A-B
B-A


Got any C# Language Question?