# C1.Zip.C1ZipEntryCollection.OpenWriter

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Zip_C1ZipEntryCollection_OpenWriter_" data-uid="C1.Zip.C1ZipEntryCollection.OpenWriter*">OpenWriter Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Zip_C1ZipEntryCollection_OpenWriter_" data-uid="C1.Zip.C1ZipEntryCollection.OpenWriter*"></a>
<h4 id="C1_Zip_C1ZipEntryCollection_OpenWriter_System_String_System_Boolean_" data-uid="C1.Zip.C1ZipEntryCollection.OpenWriter(System.String,System.Boolean)">OpenWriter(string, bool)</h4>
<div class="markdown level1 summary"><p>Opens a stream for writing an entry into the zip file.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Stream OpenWriter(string entryName, bool useMemory)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function OpenWriter(entryName As String, useMemory As Boolean) 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.string">string</a></td>
      <td><span class="parametername">entryName</span></td>
      <td><p>The name of the new entry.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">useMemory</span></td>
      <td><p>Whether to use a memory stream or temporary file.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</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><p>A stream that can be used to write data into the zip file. The entry
is not added until the stream is closed.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Zip_C1ZipEntryCollection_OpenWriter_" data-uid="C1.Zip.C1ZipEntryCollection.OpenWriter*"></a>
<h4 id="C1_Zip_C1ZipEntryCollection_OpenWriter_System_String_System_DateTime_System_Boolean_" data-uid="C1.Zip.C1ZipEntryCollection.OpenWriter(System.String,System.DateTime,System.Boolean)">OpenWriter(string, DateTime, bool)</h4>
<div class="markdown level1 summary"><p>Opens a stream for writing an entry into the zip file.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Stream OpenWriter(string entryName, DateTime dateTime, bool useMemory)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function OpenWriter(entryName As String, dateTime As Date, useMemory As Boolean) 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.string">string</a></td>
      <td><span class="parametername">entryName</span></td>
      <td><p>The name of the new entry.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a></td>
      <td><span class="parametername">dateTime</span></td>
      <td><p>The date and time when the file was last modified.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">useMemory</span></td>
      <td><p>Whether to use a memory stream or temporary file.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</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><p>A stream that can be used to write data into the zip file. The entry
is not added until the stream is closed.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
