Prior to C# 7, the only type of tuple was the System.Tuple class. This type of Tuple is an immutable class (reference type) and a big drawback to this type of tuple is that its members can only be named item1, item2, item3, itemX etc. There is no way to name the members of the System.Tuple something meaningful - which hurts readability. Below is an example of a System.Tuple:
var tuple = new System.Tuple<string, int>("Peter", 32); var name = tuple.Item1; var age = tuple.Item2;
With C# 7, this changed with the introduction of the System.ValueTuple. The System.ValueTuple is a struct (value type) and its data members are fields contrary to the properties of the System.Tuple. The biggest upside of the ValueTuple is that its members can be named and it has some very simplistic ways of being initialised:
var tuple = (Name: "name", Age: 32); var name = tuple.Name; var age = tuple.Age;
I hope you found this post on the differences between the original Tuple class and the newer ValueTuple struct. If you did, please leave a comment down below!