We can make use of BinaryReader and
BinaryWriter class for reading and writing binary files respectively.

Ã‚Â

While creating object of BinaryReader
and BinaryWriter we have to pass stream object as constructor argument. First
we create the object of FileStream class which references to the specified
file. And the object of FileStream class ,we pass as constructor argument of
BinaryReader and BinaryWriter class.