static void Main(string[] args) { ICommit commitClient = new Commit(@"C:\Users\User\Desktop\Baza\Message.txt", @"C:\Users\User\Desktop\Baza\Message1.txt"); while (true) { foreach (var item in commitClient.CommitClient()) { Console.WriteLine(item); } } }