public void Show() { //var (first, last) = GetFirstAndLastname(); //var firstName = GetFirstAndLastname(); var firstAndLastName = new FirstAndLastName("Jenny", "?"); var (firstName, lastName) = firstAndLastName; //automatically calls method Deconstruct. }
public void ShowAssignByOut () { string first; string last; var firstAndLastName = new FirstAndLastName("Jenny", "?"); firstAndLastName.AssignByOut(out first, out last); }