Read a file line by line: Difference between revisions
Content added Content deleted
(→{{header|C}}: more specific error messages) |
|||
Line 369: | Line 369: | ||
}</lang> |
}</lang> |
||
=={{header|C sharp |
=={{header|C sharp}}== |
||
'File.ReadLines' reads the lines of a file which could easily bee stepped through. |
'File.ReadLines' reads the lines of a file which could easily bee stepped through. |
||
<lang csharp>foreach (string readLine in File.ReadLines("FileName") |
<lang csharp>foreach (string readLine in File.ReadLines("FileName") |
||
Line 408: | Line 408: | ||
} |
} |
||
}</lang> |
}</lang> |
||
=={{header|Common Lisp}}== |
=={{header|Common Lisp}}== |
||
<lang lisp>(with-open-file (input "file.txt") |
<lang lisp>(with-open-file (input "file.txt") |