Provide ShouldSerialize#PropertyName# and Reset#PropertyName# along with your property.
Example:
private bool ShouldSerializeFont()
{
return this.bFontSet;
}
///
/// Resets the property to its default value.
///
private void ResetFont()
{
this.localFont = null;
}
Share with