c# 7.x using a short name for tuple type
Clash Royale CLAN TAG #URR8PPP c# 7.x using a short name for tuple type Anyways to use shortcuts for Tuple types, but still preserve the names for each item in the Tuple? (I have created the examples in the code below with my comments.) /* This way is desired because it keeps the naming for each item in the Tuple, but incorrect for C# 7.x */ using Employee = (string Name, DateTime StartTime, DateTime LeaveTime, int Id, double Payment); /* This way is correct in C# 7.x grammar, but I lost all the names for the items, and I have to using Item1, Item2 and so on.... */ using Employee = Tuple<string, DateTime, DateTime, int, double>; public class TestFunc { public Employee GetEmployee() { Employee value; value.Name = "Steve"; value.StartTime = new DateTime(); value.EndTime = new DateTime(); return value; } } Is the first one valid C# at all? – john 6 secs ago ...