May 2010
Intermediate to advanced
1272 pages
61h 18m
English
The Task class also has a generic counterpart that you can use for creating tasks that return a value. For example consider the following code snippet that creates a task returning a value of type Double, which is the result of calculating the tangent of an angle:

Console.WriteLine(taskWithResult.Result)
Basically you use a Function, which represents a System.Func(Of T) so that you can return a value from your operation. The result is accessed via the Task.Result property. In the preceding example, the Result property contains the result of the tangent calculation. The problem is that the start value on which ...
Read now
Unlock full access