对int数组进行从大到小的排序,并去除重复项
static void Main(string[] args)
{
int[] xx = { 1, 4, 4, 4, 6, 6, 8, 76, 7, 4 };
List<int> l = xx.ToList<int>();
l.Sort();
var query = (from q in l
select q).Distinct();
for (int i = query.Count() - 1; i > 0; i--)
{
Console.Write(query.ElementAt(i) + " , ");
}
Console.Read();
}