Re: Is There the EOF in C#?

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Nick Malik (nickmalik_at_hotmail.nospam.com)
Date: 02/24/04


Date: Tue, 24 Feb 2004 15:30:29 GMT

Are you expecting a character encoded in the file that indicates the end of
file?

This is not a C# thing.

The file system does not encode a character to indicate the end of file
(although Ctrl-Z will still be treated as EOF by older C programs when
reading in character mode). The file system keeps track of the length of a
file, and when you've read all the characters, or bytes, in the file (as the
case may be), you are at the end. It's pretty simple.

EOF is a condition that can be detected using the properties on the stream
that you are using to read or write a file. It is not a character.

Hope this helps
--- Nick

"±èÀçȲ" <jhwang2u@dreamwiz.com.kr.korea.me.mail.me> wrote in message
news:e1rtWmf%23DHA.2432@TK2MSFTNGP09.phx.gbl...
> Is There the EOF in C#.?
>
> What is the EOF..?
>
> Why C# doen't have EOF ..?
>
> Thanks..Enjoy Programming!!
>
>



Relevant Pages

  • Re: detab utility challenge.
    ... it is possible that some valid character may ... I'd guess the answer is the same, use feof() to verify an eof ... no. Undefined Behaviour is a technical term from the standard. ... Any program written in any language can contain mistakes. ...
    (comp.lang.c)
  • Re: detab utility challenge (wrapping up).
    ... opens up UB is argvcontains over 500 character is unacceptable. ... Another problem is that putchar needs to be tested for EOF on every call, ... but it will only break on pathological implementations or (more ... Mission creep should be seen for what it is, ...
    (comp.lang.c)
  • Re: confused about behaviour of scanf
    ... Scanf also always leaves the terminating char in the input stream, so flushln (barring EOF or error) will always have a '\n' to terminate on. ... They allow overflow detection, ... detect the character that terminated a numerical field. ... Skipblks returns the char that getc will next return, ...
    (comp.lang.c)
  • Re: String to integer
    ... detect the character that terminated a numerical field. ... Skipblks returns the char that getc will next return, or EOF. ... int skipwhite; ...
    (comp.lang.c)
  • Re: Building a simple command line interface
    ... detect the character that terminated a numerical field. ... static int ignoreblks ... which may be \n or EOF ... Skipblks returns the char that getc will next return, ...
    (comp.arch.embedded)