EndOfData Property


EndOfData Property

Location

TextFieldParser.EndOfData

Syntax

     Dim fileParser As FileIO.TextFieldParser     ' ...later...     Dim result As Boolean = fileParser.EndOfData 

Description

The EndOfData property indicates whether the parser has passed the final valid data record in the file (TRue) or not (False).

Usage at a Glance

  • This property only considers valid record entries. If there are blank lines or other non-data lines between the current position and the true end of the file, those are ignored.

  • You must close the TextFieldParser object when finished with it. Use the object's Close method or create the object instance with the Using keyword. See the TextFieldParser Object entry in this chapter for an example.

Example

The EndOfData property provides a convenient method to check for the end of the input data when parsing the entire contents of a file.

     Dim fileParser As FileIO.TextFieldParser     ' ...later...     Do While Not fileParser.EndOfData        ' ----- Read and process one record of data here.     Loop     fileParser.Close 

Related Framework Entries

  • Microsoft.VisualBasic.FileIO.TextFieldParser.EndOfData Property

See Also

Close Method, LineNumber Property, PeekChars Method, ReadFields Method, ReadLine Method, ReadToEnd Method, TextFieldParser Object




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net