/// <summary>Derrived classes may decide that the element should not be written. For example, the text element shouldn't be written if it's empty.</summary>
publicvirtualboolShouldWriteElement()
publicvoidWriteElement(XmlTextWriterwriter)
{
//Write any element who has a name.
return(this.ElementName!=String.Empty);
//Save previous culture and switch to invariant for writing