我正在使用一个类
public partial class CashFlowIndicator:IEnumerable
{
public static void getCashFlowChartValues(int userid)
{
List<KeyValuePair<string, string>> chartValues=new List<KeyValuePair<string,string>>();
chartValues = cashFlowChart(userid);
}
public static List<KeyValuePair<string, string>> cashFlowChart(int userid)
{
//.............................
//..................................
List<KeyValuePair<string, string>> cashFlowItems = new List<KeyValuePair<string, string>>();
cashFlowItems.Add(new KeyValuePair<string, string>(a, b));
cashFlowItems.Add(new KeyValuePair<string, string>(c, d));
//.....................
return cashFlowItems;
}
}
问题是在调用函数 cashFlowChart 时,变量“chartValues”没有被返回的值分配.....
有什么解决办法吗?