/// <summary>
/// 统计数组中的重复数据出现的个数
/// </summary>
/// <returns></returns>
private Dictionary<int, int> GetListInfo(List<int> ids)
{
Dictionary<int, int> dic =
new Dictionary<int, int>();
var lst = from v in ids
group v by v into G
orderby G.Key
select new
{
data = G.Key,
count = G.Count()
};
foreach (var v in lst)
{
dic.Add(v.data, v.count);
}
return dic;
}