Search code examples
c#tuple-struct

Up to several variables can be used for tuples?


I have heard that up to 7 variables can be used, but I have requested more. I want to know the maximum number of variables that can be used.


Solution

  • tuples are unlimited, pay attention to this example:

    var t1 = ("a", "b", "c", "d", "e", "f", "g","h","i");
            Console.WriteLine(t1);
            Console.ReadKey();
    

    and now we can say that tuples are unlimited because they don't only take 7 varibles but have more capacity