using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace Rextester
{
public class Program
public static void Main(string[] args)
try
StreamReader sr = new StreamReader (@"D:\task.txt");
string s;
while (sr.EndOfStream != true)
s = sr.ReadLine();
Console.WriteLine(s);
}
Console.ReadLine();
catch (Exception ex)
Console.WriteLine("Ошибка", ex);