int[] nums = { 3, 4, 5, 6, 4, 5, 7 }; var numMayores = nums.Where(n => n > 5).ToList(); var numPares = nums.Where(n => n % 2 == 0).ToList(); var numImpares = nums.Where(n => n % 2 != 0).ToList();
Al operador => se le conoce como Operador Lambda.
delegate int Operacion(int a, int <img src='http://www.hola-mundo.net/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt='B)' />; Operacion Sumar = (a, <img src='http://www.hola-mundo.net/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt='B)' /> => a + b; Operacion Restar = (a, <img src='http://www.hola-mundo.net/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt='B)' /> => a - b;