using System; using System.Collections.Generic; using System.Linq; class Massiivitehted { public static void Main(string[] arg) { int[] m = {2, 6, 4, 5, 3, 2}; Console.WriteLine(string.Join(" ", m)); IEnumerable erinevad = m.Distinct(); Console.WriteLine(string.Join(" ", erinevad)); int[] m2 = erinevad.ToArray(); Console.WriteLine(string.Join(" ", m2)); int[] m3 = m.Distinct().ToArray(); Console.WriteLine(string.Join(" ", m3)); } }