Re: checking for end of file, was...C# Writing to a file

  • From: "black ares" <matematicianu2003@xxxxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Sun, 9 May 2010 19:19:45 +0300

not, there is a constant.
Also you can readline with streamreader while it returns null.
Or to read byte, int, or other things until they return -1.
Also, there are static functions in the file class
like readtoend
which takes a filename and read it
up to end in a variable.
Read the documentation for read and other read functions and you will see how to use them in c#. Also the peek function is an alternative, it is >0 when something is left in the file
and -1 when the end is reached.


----- Original Message ----- From: "Tyler Littlefield" <tyler@xxxxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Sunday, May 09, 2010 6:18 PM
Subject: Re: checking for end of file, was...C# Writing to a file


Looking at the c# filestream, I see a position and a length, but not an eof like I'm used to using. I guess you could compare position and length.
__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind


__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

Other related posts: