Advertisement
Guest User

Untitled

a guest
Oct 31st, 2016
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.58 KB | None | 0 0
  1. namespace ConsoleApplication1
  2. {
  3.     class Program
  4.     {
  5.         static void Main(string[] args)
  6.         {
  7.             StreamReader reader = new StreamReader("D:\\test.txt");
  8.             string s = reader.ReadLine();
  9.             while (reader.EndOfStream != true)
  10.             {
  11.                 if (reader.ReadLine().Length > s.Length)
  12.                 {
  13.                     s = reader.ReadLine();
  14.                 }
  15.                 //Console.WriteLine(reader.ReadLine());
  16.  
  17.             }
  18.             Console.WriteLine(s);
  19.             Console.ReadKey();
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement