title: What's the difference between the [OptionalField] and [NonSerialized]
body: <p>I came across this question on transcender:</p>
  
  <p><strong><em>What should you apply to a field if its value is not required during deserialization?</em></strong></p>
  
  <p>Me = [NonSerialized], ANSWER = [OptionalField]</p>
  
  <p>My gut reaction was NonSerialised but Transcender says I am wrong. I have a good idea what to look out for as far as the [Nonseralized] attribute is concerned but still I would really like this cleared up.</p>
  
  <p>As far as I can tell the former has a relationship with versioning conflicts between newer and older versions of the same assembly. The latter is more concerned with not serializing a field FULLSTOP. Is there anything else that might set these two apart? MSDN does not really say much about this as they both are used on the BinaryFormatters and SoapFormatter with the XMLFormatter using the XMLIgnoreAttribute.</p>
  
  <p>My second question is can you mix and match either one of the two attributes?  I have yet to use them.</p>
  
  <p>Just throwing this one out there, but does my answer have something to do with the way [OnDeserialized] and the IdeserilizationCallback interface is implemented?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I know that optional field attribute does not serialize the value held by a data member but NonSerialized will not even serialise the data member or its value.</p>