How do I easily reference to items in nested tuples?
My method below feels like more work than it suppose to take.
I think it can be faster and better, but since I recently started programming, I don't know what to call certain programming concepts and how to ask specific targeted questions about it.
My goal was to practise with varaibles and Tuples to set string s to "John␣was␣born␣on␣1-10-2001"
using System;
class Program {
public static void Main() {
var name = "John";
var day = 1;
var month = 10;
var year = 2001;
Tuple<string, Tuple<int, int, int>> person;
person = Tuple.Create(name, Tuple.Create(day, month, year));
string s = "";
s = person.Item1 + " was born on " + person.Item2.Item1 + "-" + person.Item2.Item2 + "-" + person.Item2.Item3;
}
}