Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ReadContentAsFloat()

virtual float System.Xml.XmlReader.ReadContentAsFloat ( )
inlinevirtualinherited

Reimplemented in System.Xml.XmlBaseReader, System.Xml.XmlDictionaryReader.XmlWrappedReader, System.Xml.XmlDictionaryReader, System.Xml.XmlAsyncCheckReader, System.Xml.XmlSqlBinaryReader, System.Xml.XmlSubtreeReader, and System.Xml.XsdValidatingReader.

Definition at line 222 of file XmlReader.cs.

223 {
224 if (!CanReadContentAs())
225 {
226 throw CreateReadContentAsException("ReadContentAsFloat");
227 }
228 try
229 {
230 return XmlConvert.ToSingle(InternalReadContentAsString());
231 }
232 catch (FormatException innerException)
233 {
234 throw new XmlException(System.SR.Xml_ReadContentAsFormatException, "Float", innerException, this as IXmlLineInfo);
235 }
236 }
static string Xml_ReadContentAsFormatException
Definition SR.cs:190
Definition SR.cs:7
Exception CreateReadContentAsException(string methodName)
string InternalReadContentAsString()

References System.Xml.XmlReader.CanReadContentAs(), System.Xml.XmlReader.CreateReadContentAsException(), System.Xml.Dictionary, System.Xml.XmlReader.InternalReadContentAsString(), System.Xml.XmlConvert.ToSingle(), System.SR.Xml_ReadContentAsFormatException, and System.Xml.XmlException.

Referenced by System.Xml.XmlDictionaryReader.XmlWrappedReader.ReadContentAsFloat(), System.Xml.XmlAsyncCheckReader.ReadContentAsFloat(), System.Xml.XmlSubtreeReader.ReadContentAsFloat(), System.Runtime.Serialization.XmlReaderDelegator.ReadContentAsSingle(), and System.Xml.XmlReader.ReadElementContentAsFloat().