Initial commit

This commit is contained in:
2018-02-22 23:01:00 +01:00
commit 8a754080ba
378 changed files with 2723 additions and 0 deletions

19
12.1-ReadFile/ReadFile.cs Normal file
View File

@@ -0,0 +1,19 @@
using System;
using System.IO;
class ReadFile {
public static void Main() {
StreamReader reader = new StreamReader("../../exempel.txt");
int lineNumber = 0;
string line;
// Läsa in alla rader i en fil
do {
line = reader.ReadLine();
lineNumber++;
Console.WriteLine("Line:{0}: {1}", lineNumber, line);
} while(line != null);
reader.Close();
}
}