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