Using Tuples in C# to Initialize Properties in the Constructor and to Deconstruct Your Object
Recently I was asked by a developer what this code block here actually is:
public Friend(string firstName, string middleName, string lastName)
=> (FirstName, MiddleName, LastName) = (firstName, middleName, lastName);
This is actually a constructor that uses an expression body and tuples.
(more…)