問題
使用 LINQ.ToDictionary output Disctionary data
解決方法
Dictionary<string, double> Proportion = new Dictionary<string, double>();
Proportion.Add("test1",0.3);
Proportion.Add("test2",0.7);
Dictionary<string, double> _fundMpclass3= (from a in Proportion
select new { val = a.Value , a.Key
).ToDictionary(o => o.Key, o => o.val);
沒有留言:
張貼留言