<p>What is the slickest way to initialize an array of dynamic size in C# that you know of?</p>

<p>This is the best I could come up with</p>

<pre><code>private bool[] GetPageNumbersToLink(IPagedResult result)
{
   if (result.TotalPages &lt;= 9)
      return new bool[result.TotalPages + 1].Select(b =&gt; true).ToArray();

   ...
</code></pre>

Untested, but could you just do this?
```
```
return result.Select(p => true).ToArray();
```
```
Skipping the "new bool[]" part?