public virtual double ReadContentAsDouble()
{
if (!CanReadContentAs())
{
throw CreateReadContentAsException(nameof(ReadContentAsDouble));
}
try
{
return XmlConvert.ToDouble(InternalReadContentAsString());
}
catch (FormatException e)
{
throw new XmlException(SR.Xml_ReadContentAsFormatException, "Double", e, this as IXmlLineInfo);
}
}