title: Create a list of sequential numbers excluding one number
body: <p>Requirements:</p>
  
  <ol>
  <li>Create a list of <code>n</code> sequential numbers starting at <code>a</code>.</li>
  <li>Exclude number <code>x</code>. </li>
  </ol>
  
  <p>This is the best I have right now, the problem being that it creates <code>n + 1</code> numbers if <code>x</code> is not within the range. </p>
  
  <pre><code>var numbers = Enumerable
      .Range(a, numberOfDataRowsToAdd + 1)
      .Where(i =&gt; i != TechnicalHeaderRowIndex);
  </code></pre>
  
  <p>Example 1 should produce <code>0,1,2,3,4,5,6,7,8,9</code>.</p>
  
  <pre><code>var a = 0;
  var n = 10; 
  var x = 11;
  </code></pre>
  
  <p>Example 2 should produce <code>0,1,2,3,4,5,7,8,9,10</code>.</p>
  
  <pre><code>var a = 0;
  var n = 10; 
  var x = 6;
  </code></pre>
  
  <p><a href="https://dotnetfiddle.net/pZuXT8" rel="nofollow">Here is a Fiddle that demonstrates Mark's answer.</a></p>