int[] a = { 0, 1, 2, 1, 4 }; List<int> temp = new List<int>(); foreach (int i in a) { if (temp.Contains(i)) continue; temp.Add(i); } int[] result = temp.ToArray();
110,477
社区成员
642,563
社区内容
加载中
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧