public virtual bool ReadContentAsBoolean()
{
if (!CanReadContentAs())
{
throw CreateReadContentAsException(nameof(ReadContentAsBoolean));
}
try
{
return XmlConvert.ToBoolean(InternalReadContentAsString());
}
catch (FormatException e)
{
throw new XmlException(SR.Xml_ReadContentAsFormatException, "Boolean", e, this as IXmlLineInfo);
}
}