if(some condition)
{
var columnSeries = (from l in logs
group l by l.MonitoringPorfileName into grp
select new
{
type = "column",
name = grp.Key,
data = (from h in Hours
let gd = grp.Where(x => x.Hours == h)
select gd.Sum(x => x.Count)).ToArray()
}).ToList();
}
}
我怎样才能使这个变量 columnSeries 成为全局变量?我对此进行了很多搜索,发现列表动态>新{};但他们都没有工作,所以非常感谢帮助