private void CheckReadOnly( string propertyName ) { if ( isReadOnly ) { throw new XmlException( Res.Xml_ReadOnlyProperty, "XmlWriterSettings." + propertyName ); } } }