Live Chat Icon For mobile
Live Chat Icon

How do you provide ‘dynamic’ default values

Platform: WinForms| Category: Tips

Provide ShouldSerialize#PropertyName# and Reset#PropertyName# along with your property.


private bool ShouldSerializeFont()
	return this.bFontSet;

/// Resets the  property to its default value.
private void ResetFont()
	this.localFont = null;

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.