internal void WriteCharEntity( char ch ) {
if ( (int)ch >= SurHighStart && (int)ch <= SurLowEnd ) {
throw new ArgumentException( Res.GetString( Res.Xml_InvalidSurrogateMissingLowChar ) );
}
string strVal = ((int)ch).ToString( "X", NumberFormatInfo.InvariantInfo );
if ( cacheAttrValue ) {
attrValue.Append( "&#x" );
attrValue.Append( strVal );
attrValue.Append( ';' );
}
WriteCharEntityImpl( strVal );
}