# FarPoint.Win.Spread.DefaultStyleCollection.CopyTo

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="FarPoint_Win_Spread_DefaultStyleCollection_CopyTo_" data-uid="FarPoint.Win.Spread.DefaultStyleCollection.CopyTo*">CopyTo Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="FarPoint_Win_Spread_DefaultStyleCollection_CopyTo_" data-uid="FarPoint.Win.Spread.DefaultStyleCollection.CopyTo*"></a>
<h4 id="FarPoint_Win_Spread_DefaultStyleCollection_CopyTo_System_Array_System_Int32_" data-uid="FarPoint.Win.Spread.DefaultStyleCollection.CopyTo(System.Array,System.Int32)">CopyTo(Array, int)</h4>
<div class="markdown level1 summary"><p>Copies the styles in the collection to a specified array at a specified location.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void CopyTo(Array array, int index)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub CopyTo(array As Array, index 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.array">Array</a></td>
      <td><span class="parametername">array</span></td>
      <td><p>One-dimensional array into which the elements from ICollection are copied;
the array indexing must be zero-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">index</span></td>
      <td><p>Zero-based index in the array at which to paste the styles</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="implements">Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.icollection.copyto">ICollection.CopyTo(Array, int)</a></div>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></td>
      <td><p>No array specified, or specified array is null (Nothing)</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></td>
      <td><p>Specified array is invalid; must have a rank of one</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></td>
      <td><p>Specified array is invalid; must have sufficient length</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.indexoutofrangeexception">IndexOutOfRangeException</a></td>
      <td><p>Specified index is out of range; must be greater than zero</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Win_Spread_DefaultStyleCollection_CopyTo_" data-uid="FarPoint.Win.Spread.DefaultStyleCollection.CopyTo*"></a>
<h4 id="FarPoint_Win_Spread_DefaultStyleCollection_CopyTo_FarPoint_Win_Spread_NamedStyle___System_Int32_" data-uid="FarPoint.Win.Spread.DefaultStyleCollection.CopyTo(FarPoint.Win.Spread.NamedStyle[],System.Int32)">CopyTo(NamedStyle[], int)</h4>
<div class="markdown level1 summary"><p>Copies the styles in the collection to a specified array at a specified location.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void CopyTo(NamedStyle[] array, int index)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub CopyTo(array As NamedStyle(), index 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="FarPoint.Win.Spread.NamedStyle.html">NamedStyle</a>[]</td>
      <td><span class="parametername">array</span></td>
      <td><p>One-dimensional array into which the elements from ICollection are copied;
the array indexing must be zero-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">index</span></td>
      <td><p>Zero-based index in the array at which to paste the styles</p>
</td>
    </tr>
  </tbody>
</table>
</div>
