using System; using System.Collections.Generic; using System.Linq; public class PruebaDistinct { public static void Main() { List edades = new List { 21, 46, 46, 55, 17, 21, 55, 55}; IEnumerable edadesDistintas = edades.Distinct(); Console.WriteLine("\nEdades diferentes:"); foreach (int edad in edadesDistintas) { Console.WriteLine("\t{0}", edad.ToString()); } } }