BinaryReader.ReadDouble() : BinaryReader « System.IO « C# / C Sharp by API






BinaryReader.ReadDouble()

 

using System;
using System.IO;

public class Binary {
  public static void Main(string [] args) {
    BinaryWriter output = new BinaryWriter(new FileStream("test.dat",FileMode.Create));
    
    output.Write(1);
    
    output.Write(0.01);
   
    output.Close();
    BinaryReader input = new BinaryReader(new FileStream("test.dat",FileMode.Open));
    Console.WriteLine("{0} ", input.ReadInt32());
    Console.WriteLine("{0:F1} ", input.ReadDouble());
    input.Close();
  }
}

   
  








Related examples in the same category

1.new BinaryReader(FileStream fs)
2.BinaryReader.BaseStream
3.BinaryReader.PeekChar()
4.BinaryReader.ReadByte()
5.BinaryReader.ReadChar()
6.BinaryReader.ReadDecimal()
7.BinaryReader.ReadInt32()
8.BinaryReader.ReadString()