title: public static IEnumerable<int> Method
body: <p>I am trying to call the function but I cannot. Is there any specific way to call IEnumerable methods?</p>
  
  <p>This is the function.</p>
  
  <pre><code>public static IEnumerable&lt;int&gt; UpTo(this int minValue, int maxValue)
  {
      return  maxValue &lt; minValue ? Enumerable.Empty&lt;int&gt;() : Enumerable.Range(minValue, maxValue - minValue + 1);
  }
  </code></pre>
  
  <p>And I am trying to call the function like this</p>
  
  <pre><code>var newContainer = new List&lt;int&gt;();
  newContainer.Add(1);
  newContainer.Add(2);
  newContainer.Add(3);
  newContainer.Add(4);
  
  var formattedContainer = newContainer.UpTo(10);
  </code></pre>