Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main()
- {
- Task<int> primeNumberTask = Task.Run(() =>
- {
- Thread.Sleep(3000);
- return 34;
- });
- primeNumberTask.ContinueWith(antecedent =>
- {
- int result = antecedent.Result;
- Console.WriteLine(result); // zapis 34
- });
- Console.ReadKey();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement