I have a method requiring the following:
public static List<ParetoElement>
ParetoBuildBySum(List<KeyValuePair<string, double>> inputData)
I have the following linq query and would like those two anonymous values in a list of KeyValuePairs (string and double) to pass in.
var myHistoSource = from d in data
select new
{
Type = d.Item_Expense_Type,
Amount = Double.Parse(d.Item_Amount.ToString())
};
What’s the correct way?
Thanks
Just modify your query accordingly:
As an aside, your
ParetoBuildBySummethod should most likely accept anIEnumerableinstead of aListas its parameter.