How to VB.NET BinaryWriter
The BinaryWriter Object works at lower level of Streams. BinaryWriter is used for write premitive types as binary values in a specific encoding stream. BinaryWriter Object works with Stream Objects that provide access to the underlying bytes. For creating a BinaryWriter Object , you have to first create a FileStream Object and then pass BinaryWriter to the constructor method .
Dim writeStream As FileStream
writeStream = New FileStream("c:\testBinary.dat", FileMode.Create)
Dim writeBinay As New BinaryWriter(writeStream)
The main advantages of Binary information is that it is not easily human readable and stores files as Binary format is the best practice of space utilization.
BinaryReader you can use in the same way to read as binary.
- How to VB.NET Directory operations
- How to VB.NET File operations
- How to VB.NET FileStream
- How to VB.NET TextReader
- How to VB.NET Simple TextReader
- How to VB.NET TextWriter
- How to VB.NET BinaryReader
- How to convert xps file to bmp file
- How to VB.Net Path Class
- How to create PDF files in vb.net
- How to convert text file to pdf
- Write database to PDF file