Advertisement
Guest User

Untitled

a guest
Nov 20th, 2014
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.49 KB | None | 0 0
  1. namespace ReadFile
  2. {
  3.     class Program
  4.     {
  5.         static void Main(string[] args)
  6.         {
  7.             string filePath = @"C:\Users\Patrick\Desktop\challenge.txt";
  8.             using (TextReader reader = new StreamReader(filePath))
  9.             {
  10.                 string line;
  11.                 while ((line = reader.ReadLine()) != null)
  12.                 {
  13.                     Console.WriteLine(line);
  14.                 }
  15.             }
  16.  
  17.             Console.ReadKey();
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement