 <p>What was said above is right: You can't prevent an auto-implemented property from being serialized by setting an attribute like [NonSerialized]. It just does not work.</p> <p>But what does work is the [IgnoreDataMember] attribute in case you are working with an WCF [DataContract]. So</p> <pre><code>[DataContract] public class MyClass { [DataMember] public string ID { get; set; } [IgnoreDataMember] public string MySecret { get; set; } } </code></pre> <p>will get serialized under WCF. </p> <p>Although since WCF is an opt-in technology, you can also just omit the [IgnoreDataMember] and it will work as well. So maybe my comment is a little academical ;-)</p>