ClassMicrosoft.VisualBasic.FileSystem SyntaxDim result As Boolean = EOF(fileNumber)
DescriptionThe 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
ExampleDim 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 DifferencesIn Visual Basic 2005, the My.Computer.FileSystem object provides more robust access to file management features. See AlsoLOF Function |