title: Get tuple value by index in c#
body: <p>I have a question, I have a simple named tuple and a configuration for with tuple value in 8 cases I should use, but by index so it would look like:</p>
  
  <pre><code>    private int[] delayParametersIndexSetup = new int[] {1, 0, 0, 1, 1, 0, 0, 1 };
      private (int delayWheel, int delayDiag) delayParameters = (1, 500);
  </code></pre>
  
  <p>In other words, when I iterate delayParametersIndexSetup I want a value of tuple that is represented by this index something like:</p>
  
  <pre><code>   foreach (var index in delayParametersIndexSetup)
     {
         var value = this.delayParameters.ToTuple()[index];
     }
  </code></pre>
  
  <p>and I know I can use Item1, Item2 etc, but i want this to be more flexible without using case statement.</p>
  
  <p>I read that i can use ITuple (item[x] property as it stands in documentation) but my VS this type can not be found.</p>
  
  <p>I this possible?</p>