好的,我正在寻找另一个 SO 问题的答案,我想出了以下函数来获得一个不同的 int 列表:
static List<Int32> Example(params List<Int32> lsts)
{
List<Int32> result = new List<int>();
foreach (var lst in lsts)
{
result = result.Concat(lst).ToList();
}
return result.Distinct().OrderBy(c => c).ToList();
}
当我var
在 VS2012 中查看时,它说它的类型为Int32
not List<Int32>
。此处显示:
var 不应该是 typeList<Int32>
吗?