#if (NET20 || NET35) namespace System { /// Represents a 2-tuple, or pair. /// The type of the tuple's first component. /// The type of the tuple's second component. [Serializable] public class Tuple { private readonly T1 m_Item1; private readonly T2 m_Item2; /// Initializes a new instance of the class. /// The value of the tuple's first component. /// The value of the tuple's second component. public Tuple(T1 item1, T2 item2) { m_Item1 = item1; m_Item2 = item2; } /// Gets the value of the current object's first component. /// The value of the current object's first component. public T1 Item1 => m_Item1; /// Gets the value of the current object's second component. /// The value of the current object's second component. public T2 Item2 => m_Item2; /// Returns a that represents this instance. /// A that represents this instance. public override string ToString() => $"({m_Item1}, {m_Item2})"; } } #endif