Imports System
Imports System.IO
Public Class BinaryRW
Shared Sub Main()
Dim invalidPathChars() As Char = Path.InvalidPathChars
Dim memStream As new MemoryStream()
Dim binWriter As New BinaryWriter(memStream)
binWriter.Write("test: ")
binWriter.Write(Path.InvalidPathChars)
Dim binReader As New BinaryReader(memStream)
memStream.Position = 0
Console.Write(binReader.ReadString())
Console.WriteLine(binReader.ReadChars(CInt(memStream.Length - memStream.Position)))
End Sub
End Class