CSJ2K.Util.EndianBinaryReader.ReadDecimal C# (CSharp) Метод

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

public ReadDecimal ( ) : decimal
Результат decimal
        public override decimal ReadDecimal()
        {
            if (_bigEndian)
            {
                // TODO: Is the whole thing reversed or just the individual ints?
                // Maybe we should just call ReadInt32 4 times?
                byte[] buf = this.ReadBytes(16);
                Array.Reverse(buf);
                int[] decimalints = new int[4];
                decimalints[0]=BitConverter.ToInt32(buf, 0);
                decimalints[1]=BitConverter.ToInt32(buf, 4);
                decimalints[2]=BitConverter.ToInt32(buf, 8);
                decimalints[3]=BitConverter.ToInt32(buf, 12);
                return new decimal(decimalints);
            }
            else return base.ReadDecimal();
        }