Tuple Class Provides static methods for creating tuple objects. : Tuple « Data Types « C# / C Sharp






Tuple Class Provides static methods for creating tuple objects.

 

using System;

public class MainClass{
   public static void Main(){
     var primes = Tuple.Create(2, 3, 5, 7, 11, 13, 17, 19);
     Console.WriteLine(primes.Item1);
   }
}

   
  








Related examples in the same category

1.Tuple(T1, T2) Represents a 2-tuple, or pair.
2.Use Tuple to get more than one value from a method