Getting the String that Represent the Value of the Tuple<T1,T2,T3,T4> Instance in C#
A tuple is a data structure that gives you the easiest way to represent a data set. You can also get a string that represents a tuple object by using the ToString Method. This method returns a string that will represent the Tuple<T1, T2, T3, T4> object. The string represented by this method is in the form of (Item1, Item2, Item3, Item4) here Item1, Item2, Item3, Item4 represent the values of Item1, Item2, Item3, Item4 properties. And it will represent a String.Empty if any property contains a null value.
public override string ToString ();
Return Type: The return type of this method is System.String. So, it will return a string that represents Tuple<T1, T2, T3, T4> object.
Tuple 1: (Rohit) Tuple 2: (Sheema, Riya) Tuple 3: (Rima, Suman, Sohan) Tuple 4: (Shilpa, Susma, Sumit, Rohan)
NTuple 1: (Sumit, (Bongo, Bella, Binu)) NTuple 2: (Boond, Cinki, Chimmy, (Karan, Micky)) NTuple 3: (34.9, 78.7, (12.2, 34.5, 5.6, 0.78)) NTuple 4: (2, 4, 6, 8, 5, (10, 20, 30, 40, 50))