Working with the BinaryWriter Class : Binary Read Write : File Stream C# Source Code


Custom Search

C# Source Code » File Stream » Binary Read Write »

 

Working with the BinaryWriter Class








    

using System;
using System.IO;
   
class MainClass
{
    static public void Main()
    {
     FileStream BinaryFile = new FileStream("test.dat", FileMode.Create, FileAccess.ReadWrite);
     BinaryWriter  Writer = new BinaryWriter(BinaryFile);

     Writer.Write('a');
     Writer.Write(123);
     Writer.Write(456.789);
     Writer.Write("test string");
    }
}

           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo File Stream
» Binary Read Write