title: C# Enumerable.Take with default value
body: <p>What is the best way to get exactly x values from an Enumerable in C#.
  If i use Enumerable .Take() like this:</p>
  
  <pre><code>var myList = Enumerable.Range(0,10);
  var result = myList.Take(20);
  </code></pre>
  
  <p>The result will only have 10 elements.</p>
  
  <p>I want to fill the missing entries with a default value.
  Something like this:</p>
  
  <pre><code>var myList = Enumerable.Range(0,10);
  var result = myList.TakeOrDefault(20, default(int));  //Is there anything like this?
  </code></pre>
  
  <p>Is there such a function in C# and if not, what would be the best way to achieve this?</p>