How did I do?*

Using tuples in C#

var (id, name) = GetDetails();
private static (int Id, string Name) GetDetails()
{
    return (Id: 1, Name: "Tom Jones");
}

Defining Id and Name:

  • in the method signature identifies the expected return values in intellisense
  • in the return statement just makes it clearer to other developers which value relates to which property.