title: How can I use LINQ with a class that has parallel arrays?
body: <p>I've recently started wanting to leverage LINQ in my code.  I'm working with a TimeSeries class that looks like this:</p>
  
  <pre><code>public struct TimeSeriesFloat
  {
      public DateTime[] DateTime;
      public float[] Value;
  }
  </code></pre>
  
  <p>I want to be able to use LINQ to sort on "Value" and have the DateTime array also get sorted in a way that maintains the 1:1 mapping between DateTime[i] and Value[i].</p>
  
  <p>I attempted to implement an IEnumerator on the class to start, but I couldn't even get that to work without errors. So then I stepped back and asked myself if it's even worth doing because it might not be possible to make sorting on one array also sort the other array in an parallel way that maintains the mapping.</p>
  
  <p>Is it possible?</p>
  
  <p><strong>EDIT: WOOPS!  My apologies. In my haste I was calling it a class.  It's a struct. :)</strong></p>