title: Create an array populated with a range of values x through y
body: <p>Let's say I have integer variables x and y, and I want an array populated with values x through y.  Is there a nice way to do this inline, using C#?</p>
  
  <p>I know I can achieve this using an extension method:</p>
  
  <pre><code>public static int[] ExpandToArray(this int x, int y)
  {
      var arr = int[y - x + 1];
      for (int i = x; i &lt;= y; i++) 
      {
          arr[i-x] = i;
      }
      return arr;
  }
  </code></pre>
  
  <p>And then use it to write:</p>
  
  <pre><code>x.ExpandToArray(y);
  </code></pre>
  
  <p>Is there a built-in way (without creating an extension method) in .NET to write something like <code>x.ExpandToArray(y)</code>?</p>