Working with tuples in C#

public static Tuple<int, string> GenerateTuple()
{
   return Tuple.Create(1, "my site");
}
var tupp = GenerateTuple();
Console.WriteLine(tupp.GetType());
Console.WriteLine("{0}:{1}", tupp.Item1, tupp.Item2);

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.