static void Main(string[] args) { DirectoryInfo di = new DirectoryInfo("c:\\workspace"); var _task = di.AsyncGetFiles(GetFilesHandler); var _files = _task.Result; foreach (var _file in _files) { Console.WriteLine($"result: {_file}"); } Console.ReadKey(); }