Answer: The following are two ways to instantiate a tuple:
1) Using the new operator
Example:
Tuple<String, int> t = new Tuple<String, int> ("Hellow", 2);
2) Using the Create factory method available in the Tuple class.
Example:
Tuple<int, int, int> t = Tuple.Create<int, int, int> (2, 4, 5);
Asked In: Many Interviews |
Alert Moderator