MissingProperty Sample

Back to summary

Source

#if HELPER_ASSEMBLY
using System;

namespace XmlSerializersTest.Samples
{
    public class MissingProperty
    {
        public string PropertyA { get; set; }
#if VERSION_1_0
        public string PropertyB { get; set; }

        public static MissingProperty GetInstance() 
        {
            return new MissingProperty { PropertyA = "a", PropertyB = "b" };
        }
#endif
    }
}
#endif

Standard Serializer

<MissingProperty>
  <PropertyA>a</PropertyA>
  <PropertyB>b</PropertyB>
</MissingProperty>