Added in .NET 4.0
A tuple is a data structure that has a specific number and sequence of elements
The framework directly supports tuples with one to seven elements
You can create tuples of either or more elements by nesting tuple objects in the Rest property
A tuple is a sequence of values that are grouped as one logical unit.
It is similar to data structure or user defined type in VBA.
A tuple that contains n components is called an n-tuple.
Tuples can contain data that includes seven different data types.
static void Main()
System.Tuple<int, string, bool> tuple = new System.Tuple<int, string, bool>(1, "cat", true);
if (tuple.Item1 == 1)
if (tuple.Item2 == "dog")
© 2023 Better Solutions Limited. All Rights Reserved. © 2023 Better Solutions Limited TopPrevNext