# C1.Zip.C1ZipFile.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Zip_C1ZipFile__ctor_" data-uid="C1.Zip.C1ZipFile.#ctor*">C1ZipFile Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Zip_C1ZipFile__ctor_" data-uid="C1.Zip.C1ZipFile.#ctor*"></a>
<h4 id="C1_Zip_C1ZipFile__ctor" data-uid="C1.Zip.C1ZipFile.#ctor">C1ZipFile()</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Zip.C1ZipFile.html">C1ZipFile</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public C1ZipFile()</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New()</code></pre>
</div>


<a id="C1_Zip_C1ZipFile__ctor_" data-uid="C1.Zip.C1ZipFile.#ctor*"></a>
<h4 id="C1_Zip_C1ZipFile__ctor_System_String_System_Boolean_" data-uid="C1.Zip.C1ZipFile.#ctor(System.String,System.Boolean)">C1ZipFile(string, bool)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Zip.C1ZipFile.html">C1ZipFile</a> class and creates or opens
a zip file associated with this new instance.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public C1ZipFile(string fileName, bool create)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(fileName As String, create As Boolean)</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">fileName</span></td>
      <td><p>The name of the zip file to open or create.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">create</span></td>
      <td><p>True to create a new zip file, false to open an existing file.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Zip_C1ZipFile__ctor_System_String_System_Boolean__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If <code class="paramref">create</code> is true and the zip file already exists, it is overwritten
with a new empty file.</p>
<p>If <code class="paramref">create</code> is false and the zip file already exists, the existing file 
is opened.</p>
</div>


<a id="C1_Zip_C1ZipFile__ctor_" data-uid="C1.Zip.C1ZipFile.#ctor*"></a>
<h4 id="C1_Zip_C1ZipFile__ctor_System_String_" data-uid="C1.Zip.C1ZipFile.#ctor(System.String)">C1ZipFile(string)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Zip.C1ZipFile.html">C1ZipFile</a> class and opens a zip file associated
with this new instance.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public C1ZipFile(string fileName)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(fileName 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">fileName</span></td>
      <td><p>The name of the zip file to open.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Zip_C1ZipFile__ctor_System_String__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If the file does not exist, a new empty file is created.</p>
</div>


<a id="C1_Zip_C1ZipFile__ctor_" data-uid="C1.Zip.C1ZipFile.#ctor*"></a>
<h4 id="C1_Zip_C1ZipFile__ctor_System_IO_Stream_System_Boolean_" data-uid="C1.Zip.C1ZipFile.#ctor(System.IO.Stream,System.Boolean)">C1ZipFile(Stream, bool)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Zip.C1ZipFile.html">C1ZipFile</a> class and opens a zip stream associated
with this new instance.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public C1ZipFile(Stream stream, bool create)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(stream As Stream, create As Boolean)</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.io.stream">Stream</a></td>
      <td><span class="parametername">stream</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a> that contains the zip data.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">create</span></td>
      <td><p>Whether to initialize the stream with an empty zip header or open an existing
zip file in the stream.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Zip_C1ZipFile__ctor_" data-uid="C1.Zip.C1ZipFile.#ctor*"></a>
<h4 id="C1_Zip_C1ZipFile__ctor_System_IO_Stream_" data-uid="C1.Zip.C1ZipFile.#ctor(System.IO.Stream)">C1ZipFile(Stream)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Zip.C1ZipFile.html">C1ZipFile</a> class and opens a zip stream associated
with this new instance.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public C1ZipFile(Stream stream)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(stream As Stream)</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.io.stream">Stream</a></td>
      <td><span class="parametername">stream</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a> that contains the zip data.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
