public void FindFiles() { try { var allDisks = manager.AllDisk(); SendMessage($"{allDisks}\r\nSelect a disc\r\nWrite name your disk"); SelectDisk(); while (true) { AnswerClient(); if (data.ToString() == "C") { InFolderOrFile(); } else if (data.ToString() == "P") { BackFolder(true); } else { SendMessage("Don`t understand"); } } } catch (SocketException ex) { listener.Close(); Console.WriteLine(ex); return; } }