This is the text file read by the StreamReader
.
500, 120, 60, 0, 350
100, 230, 0, 50, 0
0, 75, 0, 0, 220
3000, 400, 600, 35, 0
350, 200, 100, 80, 250
0, 285, 325, 150, 75
I want to add cities in front of each line, such that it reads like this:
Atlanta: 500, 120, 60, 0, 350
Baltimore: 100, 230, 0, 50, 0
Chicago:0, 75, 0, 0, 220
Denver: 3000, 400, 600, 35, 0
ELY: 350, 200, 100, 80, 250
Fargo: 0, 285, 325, 150, 75
Here's the current code block.
StreamReader sr = new StreamReader("inventory.txt");
String line = sr.ReadToEnd();
Console.WriteLine(line);