string? line; while ( ! string.IsNullOrEmpty( line = Console.ReadLine() ) ) { Console.Write("{0}\n", line); }