方法一:先引用 using System.Linq;
int[] DelRepeatData(int[] a)
{
return a.GroupBy(p => p).Select(p => p.Key).ToArray();
方法二:如图