0x13 0x13, or 0x13, or 0x10. (Same as ReadLine() in StreamReader). Now, I realize that people say "BinaryReader is used for reading binary files". However, There is a ReadChar() and ReadChars() method. So, you can build a ReadLine() method. I'm planning on doing just this, but will need to maintain my own internal char buffer. I could call ReadChar() and just keep checking for 0x13 and 0x10 (which I did as a quick proof of concept). However, when doing this against a file, you end up accessing the file for each char.
I'm sure I'm not the only one who has needed to do this. Just looking for any tips/pointers, before I re-invent the wheel. Thanks, Dave ----- Original Message ----- From: "Philip Nelson" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Thursday, April 14, 2005 9:35 AM Subject: Re: [ADVANCED-DOTNET] BinaryReader ReadLine() ?!? > What exactly constitutes a line in a binary file? > > --- dave wanta <[EMAIL PROTECTED]> wrote: > > Hi All, > > Has anyone ever implemented a ReadLine() method for a BinaryReader? I'm > > sure I'm not the only one implementing this, yet googling has turned up 0. > > > Philip - http://blogs.xcskiwinn.org/panmanphil > "There's a difference between righteous anger and just being crabby" - Barbara > > =================================== > This list is hosted by DevelopMentor� http://www.develop.com > > View archives and manage your subscription(s) at http://discuss.develop.com > =================================== This list is hosted by DevelopMentor� http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
