title: Selecting index of array that has a value larger than a threshold
body: <p>I have an array of doubles and a threshold value.
  I would like to select the first index in my array where the value at the index is larger than the threshold.</p>
  
  <p>How the do I accomplish that in <code>LINQ</code>?</p>
  
  <p>I got it to work with: </p>
  
  <pre><code>var n = acc_avg.Select((val, index) =&gt; new {Val = val, Index = index})
                 .Where(l =&gt; l.Val &gt; threshold)
                 .First()
                 .Index
  </code></pre>
  
  <p>But is there is better way?</p>