Why this is wrong ? (use C# Task ContinueWith )
===

when I Write C#  like that 

     Task<string> task = Task.Factory.StartNew<string>(() => "first task")
             .ContinueWith(t =>
                     {
                         Console.WriteLine(t.Result);
                         Console.WriteLine("second task");
                     });

That is wrong! 

but change like that:


 

     var  task = Task.Factory.StartNew<string>(() => "first task")
             .ContinueWith(t =>
                     {
                         Console.WriteLine(t.Result);
                         Console.WriteLine("second task");
                     });


Then all thing is OK!

why?

What is the different between "Task<string> task"  and "var task"  ？