ClassMicrosoft.VisualBasic.FileSystem SyntaxDim result As String = LineInput(fileNumber)
DescriptionThe LineInput function returns a single line of text from a file opened in Input mode. Single lines are delimited by carriage returns (vbCr) or carriage return/line-feed pairs (vbCrLf). The line-delimiting characters are not included in the returned string. Usage at a Glance
ExampleThe following code reads all of the lines in a text file and sends them to the Output window: Dim fileID As Integer = FreeFile( ) FileOpen(fileID, "c:\data.txt", OpenMode.Input, OpenAccess.Read) Do While Not EOF(fileID) Console.WriteLine(LineInput(fileID)) Loop FileClose(fileID) Version Differences
See AlsoPrint, PrintLine Procedures |