OneSimpleProperty Sample

Back to summary

Source

using System.Runtime.Serialization;

namespace XmlSerializersTest.Samples
{
    [Title("One property of built-in type")]
    public class OneSimpleProperty
    {
        public int Value { get; set; }
    }
}

WCF Serializer

<OneSimpleProperty xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/XmlSerializersTest.Samples">
  <Value>42</Value>
</OneSimpleProperty>