ferrier18 0 Newbie Poster

Hey Guys,
I'm trying to read a Binary file located at C:\Temp\SAMPLE.DAT
values in the file have been stored in format: int32,int32, Double.
1 33 172.50
2 55 40
3 77 5000
1 99 20
4 200 0

I'm trying to read the file and display the results in a richtextbox in this format:
1, 33, 172.50
2, 55, 40
3, 77, 5000
1, 99, 20

Here's the code that i have. I'm stuck and can't think of what else to do, any help would be much appreciated! Thank you very much.

Dim vMessage As String
        Dim objBinRdr As New BinaryReader(New FileStream("C:\temp\sample.dat", FileMode.Open, FileAccess.Read))
        Dim rvValues As String
        Dim vDelimiters() As Char = {",", "/", ";", ":"}

        Do While objBinRdr.PeekChar <> -1
            rvValues = objBinRdr.ReadInt32.ToString(vDelimiters)
            vMessage = objBinRdr.ReadInt32()
            RichTextBox1.AppendText(vMessage)

        Loop
        objBinRdr.Close()
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.