How to use C# BinaryReader Class
C# BinaryReader Object works at lower level of Streams. C# BinaryReader is using for read primitive types as binary values in a specific encoding stream. Binaryreader Object works with Stream Objects that provide access to the underlying bytes. For creating a BinaryReader Object , you have to first create a FileStream Object and then pass BinaryReader to the constructor method .
FileStream readStream ; readStream = new FileStream("c:\\testBinary.dat", FileMode.Open);
BinaryReader readBinary = new BinaryReader(readStream);
The main advantages of Binary information is that stores files as Binary format is the best practice of space utilization.
BinaryWriter you can use in the same way to write as binary.
- How to use C# Directory Class
- How to use C# File Class
- How to use C# FileStream Class
- How to use C# Textreader Class
- A simple C# Text Reader source code
- How to use C# TextWriter Class
- How to use C# BinaryWriter Class
- How to convert XPS file to Bitmap
- How to C# Path Class
- How to create a pdf file in C#
- How to create PDF file from Text file
- Write Database data to pdf file