MCQs>IT & Programming>C#>What is the result of the following code : void Main() { var r=0; Task t = Task.Run(() => { return 1; }).ContinueWith((i) => { r= i.Result+1; return 1; }); Console.WriteLine('{0},{1}',t.Result,r); }
C# MCQs
What is the result of the following code : void Main() { var r=0; Task t = Task.Run(() => { return 1; }).ContinueWith((i) => { r= i.Result+1; return 1; }); Console.WriteLine("{0},{1}",t.Result,r); }
Answer
Correct Answer: 1,2
Explanation:
Note: This Question is unanswered, help us to find answer for this one