System.Xml.XmlReader.ReadContentAsDecimal C# (CSharp) Метод

ReadContentAsDecimal() публичный Метод

public ReadContentAsDecimal ( ) : decimal
Результат decimal
        public virtual decimal ReadContentAsDecimal()
        {
            if (!CanReadContentAs())
            {
                throw CreateReadContentAsException(nameof(ReadContentAsDecimal));
            }
            try
            {
                return XmlConvert.ToDecimal(InternalReadContentAsString());
            }
            catch (FormatException e)
            {
                throw new XmlException(SR.Xml_ReadContentAsFormatException, "Decimal", e, this as IXmlLineInfo);
            }
        }

Usage Example

Пример #1
0
 public override decimal ReadContentAsDecimal()
 {
     CheckAsync();
     return(_coreReader.ReadContentAsDecimal());
 }
All Usage Examples Of System.Xml.XmlReader::ReadContentAsDecimal