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

◆ ToDouble()

static double System.Xml.XmlConvert.ToDouble ( string s)
inlinestatic

Definition at line 900 of file XmlConvert.cs.

901 {
902 s = TrimString(s);
903 if (s == "-INF")
904 {
905 return double.NegativeInfinity;
906 }
907 if (s == "INF")
908 {
909 return double.PositiveInfinity;
910 }
911 double num = double.Parse(s, NumberStyles.Float, NumberFormatInfo.InvariantInfo);
912 if (num == 0.0 && s[0] == '-')
913 {
914 return -0.0;
915 }
916 return num;
917 }
static string TrimString(string value)

References System.Globalization.NumberFormatInfo.InvariantInfo, System.s, and System.Xml.XmlConvert.TrimString().

Referenced by System.Xml.Schema.XmlUntypedConverter.ChangeType(), System.Xml.Schema.XmlUntypedConverter.ChangeType(), System.Data.Common.SqlConvert.ChangeTypeForXML(), System.Data.Common.DoubleStorage.ConvertXmlToObject(), System.Xml.Schema.XmlUntypedStringConverter.FromString(), System.Xml.Linq.XAttribute.operator double(), System.Xml.Linq.XElement.operator double(), System.Xml.Linq.XAttribute.operator double?(), System.Xml.Linq.XElement.operator double?(), System.Xml.Schema.Datatype_doubleXdr.ParseValue(), System.Xml.Serialization.XmlSerializationPrimitiveReader.Read_double(), System.Xml.XmlReader.ReadContentAsDouble(), System.Xml.XmlSqlBinaryReader.ReadContentAsDouble(), System.Xml.XmlReader.ReadElementContentAsDouble(), System.Xml.Serialization.XmlSerializationReader.ReadTypedPrimitive(), System.Data.SqlTypes.SqlDouble.ReadXml(), System.Xml.Schema.XmlSchemaInference.RefineSimpleType(), System.Xml.Schema.XmlUntypedConverter.ToDouble(), System.Xml.XmlConverter.ToDouble(), System.Xml.Schema.XmlNumeric2Converter.ToDouble(), System.Xml.Schema.XmlUntypedConverter.ToDouble(), System.Xml.Schema.XmlNumeric2Converter.ToSingle(), and System.Xml.Serialization.ReflectionXmlSerializationReader.WritePrimitive().