Getting the String that Represent the Value of ValueTuple<T1> Instance in C#
ValueTuple is a structure introduced in C# 7.0 which represents the value type Tuple. It allows you to store a data set that contains multiple values that may or may not be related to each other. You can also get a string that represents the value of the ValueTuple’s object with the help of the ToString Method.
This method returns a string that will represent the value of the ValueTuple<T1> object. The string represented by this method is in the form of (Item1) here Item1 represents the values of Item1 property, 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 ValueTuple<T1> object.
ValueTuple 1: (Rina)
NValueTuple 1: (Anu, 23, (C++, Java, Python, C#)) NValueTuple 2: (Boond, 27, Junior Engineer, (C++, Java)) NValueTuple 3: (Rohit, 25, HR, (C++, Java, C#)) NValueTuple 4: (Mohan, 26, Junior Engineer, (C++, Java, Python))