Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private async void OnClick()
- {
- try
- {
- await Download();
- }
- catch (Exception e)
- {
- Console.WriteLine(e);
- }
- }
- private async Task Download()
- {
- Console.Write("Download started");
- await Task.Delay(1000);
- throw new Exception("Error");
- }
Advertisement
Add Comment
Please, Sign In to add comment