# C1.C1Preview.OutputRange.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_C1Preview_OutputRange__ctor_" data-uid="C1.C1Preview.OutputRange.#ctor*">OutputRange Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_C1Preview_OutputRange__ctor_" data-uid="C1.C1Preview.OutputRange.#ctor*"></a>
<h4 id="C1_C1Preview_OutputRange__ctor" data-uid="C1.C1Preview.OutputRange.#ctor">OutputRange()</h4>
<div class="markdown level1 summary"><p>Creates a new instance of the output range that includes all pages in the document.
Note that enumerating the resulting range must be broken by the client.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public OutputRange()</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New()</code></pre>
</div>


<a id="C1_C1Preview_OutputRange__ctor_" data-uid="C1.C1Preview.OutputRange.#ctor*"></a>
<h4 id="C1_C1Preview_OutputRange__ctor_System_Int32_" data-uid="C1.C1Preview.OutputRange.#ctor(System.Int32)">OutputRange(int)</h4>
<div class="markdown level1 summary"><p>Creates a new instance of the output range that includes all pages in the document.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public OutputRange(int maxPageNumber)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(maxPageNumber As Integer)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">maxPageNumber</span></td>
      <td><p>The maximum page number (used to prevent infinite enumeration).</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_OutputRange__ctor_" data-uid="C1.C1Preview.OutputRange.#ctor*"></a>
<h4 id="C1_C1Preview_OutputRange__ctor_System_Int32_System_Int32_" data-uid="C1.C1Preview.OutputRange.#ctor(System.Int32,System.Int32)">OutputRange(int, int)</h4>
<div class="markdown level1 summary"><p>Creates an instance of OutputRange that includes a single interval of
pages. FromPage may be greater than ToPage, in that case the range is
inverted.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public OutputRange(int fromPage, int toPage)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(fromPage As Integer, toPage As Integer)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">fromPage</span></td>
      <td><p>The number of the first page to include (1-based).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">toPage</span></td>
      <td><p>The number of the last page to include (1-based).</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_OutputRange__ctor_" data-uid="C1.C1Preview.OutputRange.#ctor*"></a>
<h4 id="C1_C1Preview_OutputRange__ctor_System_Int32___" data-uid="C1.C1Preview.OutputRange.#ctor(System.Int32[])">OutputRange(int[])</h4>
<div class="markdown level1 summary"><p>Creates an instance of OutputRange that includes all pages with
numbers specified in the list. The list may include Dash values to
specify intervals.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public OutputRange(int[] pageNumbers)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(pageNumbers As Integer())</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>[]</td>
      <td><span class="parametername">pageNumbers</span></td>
      <td><p>The array of page numbers to include.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_OutputRange__ctor_" data-uid="C1.C1Preview.OutputRange.#ctor*"></a>
<h4 id="C1_C1Preview_OutputRange__ctor_System_String_" data-uid="C1.C1Preview.OutputRange.#ctor(System.String)">OutputRange(string)</h4>
<div class="markdown level1 summary"><p>Creates an instance of OutputRange that includes pages specified by the
string parameter.
The string may contain:</p>
<ul>
<li>page numbers (1-based) separated by spaces or commas;</li>
<li>dashes ('-') to specify intervals (a dash at the end implies infinity).</li>
</ul>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public OutputRange(string pages)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(pages As String)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">pages</span></td>
      <td><p>The pages to be included.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
