# GrapeCity.ActiveReports.Core.Rdl.Persistence.Xml.SerializerBuilder.Switch

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_ActiveReports_Core_Rdl_Persistence_Xml_SerializerBuilder_Switch_" data-uid="GrapeCity.ActiveReports.Core.Rdl.Persistence.Xml.SerializerBuilder.Switch*">Switch Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_ActiveReports_Core_Rdl_Persistence_Xml_SerializerBuilder_Switch_" data-uid="GrapeCity.ActiveReports.Core.Rdl.Persistence.Xml.SerializerBuilder.Switch*"></a>
<h4 id="GrapeCity_ActiveReports_Core_Rdl_Persistence_Xml_SerializerBuilder_Switch__1_GrapeCity_ActiveReports_Core_Rdl_Extensibility_IXmlItemSerializer___" data-uid="GrapeCity.ActiveReports.Core.Rdl.Persistence.Xml.SerializerBuilder.Switch``1(GrapeCity.ActiveReports.Core.Rdl.Extensibility.IXmlItemSerializer[])">Switch&lt;TBaseItem&gt;(params IXmlItemSerializer[])</h4>
<div class="markdown level1 summary"><p>Creates a <a class="xref" href="GrapeCity.ActiveReports.Core.Rdl.Seralization.Common.Coders.ObjectCoder-1.html">Coders.ObjectCoder&lt;T&gt;</a> type coder for the XML serialization
of collections with different item types.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static Coders.ObjectCoder&lt;TBaseItem&gt; Switch&lt;TBaseItem&gt;(params IXmlItemSerializer[] itemSerializer)</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="GrapeCity.ActiveReports.Core.Rdl.Extensibility.IXmlItemSerializer.html">IXmlItemSerializer</a>[]</td>
      <td><span class="parametername">itemSerializer</span></td>
      <td><p>A collection of item serializers with different item types.</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="GrapeCity.ActiveReports.Core.Rdl.Seralization.Common.Coders.html">Coders</a>.<a class="xref" href="GrapeCity.ActiveReports.Core.Rdl.Seralization.Common.Coders.ObjectCoder-1.html">ObjectCoder</a>&lt;TBaseItem&gt;</td>
      <td><p>A <a class="xref" href="GrapeCity.ActiveReports.Core.Rdl.Seralization.Common.Coders.ObjectCoder-1.html">Coders.ObjectCoder&lt;T&gt;</a> object which writes and reads
collections of objects to/from XML format.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="typeParameters">Type Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="parametername">TBaseItem</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_Core_Rdl_Persistence_Xml_SerializerBuilder_Switch__1_GrapeCity_ActiveReports_Core_Rdl_Extensibility_IXmlItemSerializer____remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The method should be used to create serializers for properties that can reference objects of different types,
such as a collection of report items.</p>
</div>
</div>
