Advertisement
LaughingMan

Untitled

Aug 20th, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.25 KB | None | 0 0
  1. public static async void ProcessFileAsync(FileInfo file)
  2.         {
  3.             try
  4.             {
  5.                 Task task = Task.Run(() => ProcessFile(file));
  6.                 await task;
  7.             }
  8.             catch (Exception e)
  9.             {
  10.                 Console.WriteLine($"\r\n{e.Message}\r\n{e}");
  11.                 throw;
  12.             }
  13.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement