Problem in converting ToDictionary<Datetime,double>() using LINQ(C#3.0)
Posted
by Newbie
on Stack Overflow
See other posts from Stack Overflow
or by Newbie
Published on 2010-05-20T06:37:33Z
Indexed on
2010/05/20
6:50 UTC
Read the original article
Hit count: 244
I have written the below
return (from p in returnObject.Portfolios.ToList()
from childData in p.ChildData.ToList()
from retuns in p.Returns.ToList()
select new Dictionary<DateTime, double> ()
{ p.EndDate, retuns.Value }
).ToDictionary<DateTime,double>();
Getting error
No overload for method 'Add' takes '1' arguments
Where I am making the mistake
I am using C#3.0
Thanks
© Stack Overflow or respective owner