我使用这段代码
public static void Main()
{
Task<int> t = new Task<int>(() => { return 43; });
t.Start();
t.ContinueWith((i) => {return i.Result * 2; });
Console.WriteLine("i = {0}", t.Result.ToString());
Console.Read();
}
我注意到 t.Result 的值为 43 而不是 86。 如果我在 ContinueWith 中打印一些内容,它会出现在控制台中。 为什么 Result 没有被 ContinueWith 修改?