Task<IDictionary<double, double>> GetTaskDict()
{
return Task.FromResult(new Dictionary<double, double> () );
}
This code does not compile because we can not convert between Task<Dictionary<double, double>> to Task<IDictionary<double, double>>. Why does this not work, and is it possible to make this type of call work? This opposed to a method like this which compiles
IDictionary<double, double> GetTaskDict()
{
return new Dictionary<double, double> ();
}