System.Xml.XmlBinaryNodeWriter.WriteDoubleText C# (CSharp) Méthode

WriteDoubleText() public méthode

public WriteDoubleText ( double d ) : void
d double
Résultat void
        unsafe public override void WriteDoubleText(double d)
        {
            float f;
            if (d >= float.MinValue && d <= float.MaxValue && (f = (float)d) == d)
            {
                WriteFloatText(f);
            }
            else
            {
                int offset;
                byte[] buffer = GetTextNodeBuffer(1 + sizeof(double), out offset);
                byte* bytes = (byte*)&d;
                buffer[offset + 0] = (byte)XmlBinaryNodeType.DoubleText;
                buffer[offset + 1] = bytes[0];
                buffer[offset + 2] = bytes[1];
                buffer[offset + 3] = bytes[2];
                buffer[offset + 4] = bytes[3];
                buffer[offset + 5] = bytes[4];
                buffer[offset + 6] = bytes[5];
                buffer[offset + 7] = bytes[6];
                buffer[offset + 8] = bytes[7];
                Advance(1 + sizeof(double));
            }
        }