Home

Dumping Task<Task<T>>

It seems that Task<Task> is handled differently than Task; the former is returned by the Task.ContinueWith method.

When the task is finished before dumping LINQPad dumps the Task structure instead of the value.

This is reproducible using the following script:

Enumerable.Range(0, 5).Select(_ => Task.FromResult(1).ContinueWith(async x => await Task.FromResult(x.Result))).Dump();

(A few runs may be required)

Comments

Sign In or Register to comment.