| | |
Binary Reader help needed for Beginner!
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Mar 2008
Posts: 5
Reputation:
Solved Threads: 0
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.
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.
VB.NET Syntax (Toggle Plain Text)
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()
![]() |
Other Threads in the VB.NET Forum
- Previous Thread: Creating or opening existing tables
- Next Thread: Installation vb.net application
| Thread Tools | Search this Thread |
.net .net2008 2008 access account advanced application array basic beginner browser button buttons center click code combo cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic excel exists fade filter forms generatetags gridview html images input insert intel internet listview map mobile module monitor msaccess net number objects open panel passingparameters pdf picturebox picturebox2 port position print printing problem regex remove right-to-left save search searchvb.net select serial settings shutdown socket sqldatbase sqlserver survey temperature textbox timer timespan transparency txttoxmlconverter update user usercontol vb vb.net vb.netformclosing()eventpictureboxmessagebox vba vbnet visual visualbasic visualbasic.net visualstudio.net visualstudio2008 web winforms wpf wrapingcode xml year





