title: System.InvalidProgramException: Common Language Runtime detected an invalid program
body: <p>All, </p>
  
  <p>I am using ZeroFormatter for serialization of a big object, sometimes it is giving following error while serializing the error, this issue is observed after using Union concept of ZeroFormatter for inheritence.</p>
  
  <p>Here are the exception details:</p>
  
  <blockquote>
    <p>System.InvalidProgramException: Common Language Runtime detected an invalid program.<br>
    at ZeroFormatter.DynamicObjectSegments.ZeroFormatter_Formatters_DefaultResolver.Colibrium.Common.Ontology.Rating.Factors.RateFactor$Formatter.Serialize(Byte[]&amp; , Int32 , RateFactor )<br>
    at ZeroFormatter.Formatters.CollectionFormatter<code>3.Serialize(Byte[]&amp; bytes, Int32 offset, TCollection value)<br>
    at ZeroFormatter.DynamicObjectSegments.ZeroFormatter_Formatters_DefaultResolver.Colibrium.Common.Ontology.Rating.RateClass$Formatter.Serialize(Byte[]&amp; , Int32 , RateClass )<br>
    at ZeroFormatter.Formatters.CollectionFormatter</code>3.Serialize(Byte[]&amp; bytes, Int32 offset, TCollection value)<br>
    at ZeroFormatter.DynamicObjectSegments.ZeroFormatter_Formatters_DefaultResolver.Colibrium.Common.Ontology.Rating.PackagePlan$Formatter.Serialize(Byte[]&amp; , Int32 , PackagePlan )<br>
    at ZeroFormatter.Formatters.CollectionFormatter<code>3.Serialize(Byte[]&amp; bytes, Int32 offset, TCollection value)<br>
    at ZeroFormatter.DynamicObjectSegments.ZeroFormatter_Formatters_DefaultResolver.Colibrium.Common.Ontology.Rating.Package$Formatter.Serialize(Byte[]&amp; , Int32 , Package )<br>
    at ZeroFormatter.Formatters.CollectionFormatter</code>3.Serialize(Byte[]&amp; bytes, Int32 offset, TCollection value)<br>
    at ZeroFormatter.DynamicObjectSegments.ZeroFormatter_Formatters_DefaultResolver.Colibrium.Common.Ontology.Rating.PackageGroup$Formatter.Serialize(Byte[]&amp; , Int32 , PackageGroup )<br>
    at ZeroFormatter.Formatters.CollectionFormatter<code>3.Serialize(Byte[]&amp; bytes, Int32 offset, TCollection value)<br>
    at ZeroFormatter.DynamicObjectSegments.ZeroFormatter_Formatters_DefaultResolver.Colibrium.Common.Ontology.Rating.Group.GroupRatingResults$Formatter.Serialize(Byte[]&amp; , Int32 , GroupRatingResults )<br>
    at ZeroFormatter.ZeroFormatterSerializer.CustomSerializer</code>1.Serialize[T](T obj)<br>
    at Colibrium.Utility.Library.ObjectConverter`1.ConvertO
    bjectToBinaryZeroFormatter(T p_object) </p>
    
    <p>in C:\TFS\UPMC\Repos\Colibrium.Utility.Library\ObjectConverter.cs:line 407  </p>
  </blockquote>