Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
Class
Microsoft.VisualBasic.FileSystem Syntax
Dim result As Boolean = EOF(fileNumber)
Description
The EOF function indicates whether the current position within an open file is at the end of the file (true) or not (False). This function applies to files opened for binary, random, or sequential input. Usage at a Glance
Example
Dim oneLine As String Dim fileID As Integer = FreeFile( ) FileOpen(fileID, "c:\data.txt", OpenMode.Input, OpenAccess.Read) Do While Not EOF(fileID) oneLine = LineInput(fileID) Console.WriteLine(oneLine) Loop FileClose(fileID) Version Differences
In Visual Basic 2005, the My.Computer.FileSystem object provides more robust access to file management features. See Also
LOF Function |
Категории