title: C# Array initialization - with non-default value
body: <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>