IgnoreProperty Sample

Back to summary

Source

using System;
using System.Xml.Serialization;
using System.ComponentModel;

namespace XmlSerializersTest.Samples
{
    [Title("Ignore a Property")]
    public class IgnoreProperty
    {
        [XmlIgnore]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public string Bomb 
        { 
            get { throw new NotImplementedException(); }
            set { throw new NotImplementedException(); }
        }
    }
}

XAML Serializer

<IgnoreProperty xmlns="clr-namespace:XmlSerializersTest.Samples;assembly=XmlSerializersTest" />