title: Finding same integer ranges that are in two arrays
body: <p>I'm trying to find the index and length of ranges that consist of two or more adjacent numbers in an array that might also exist in another array (but might not start at the same indices). Example:</p>
  
  <pre><code>var source = new[] {6, 15, 8, 1, 2, 4, 11, 21};
  var target = new[] {8, 1, 2, 4, 15, 11, 21, 6};
  </code></pre>
  
  <p>These two arrays differ but both posses two equal ranges of two adjacent numbers <code>[1, 2]</code> and <code>[11, 21]</code>. I want to write a function that can find the start index and length of such ranges in the source array (in this case index 3, length 2 for the first and index 6, length 2 for the second).</p>
  
  <p>My initial approach would probably be to write nested loops that iterate over every field in both arrays and compare them but that would quickly turn into a performance killer with large arrays. Is there any useful LINQ API or other method to find these values?</p>