c# lambda expression

C#
int[] numbers = {1, 3, 5, 6, 7, 8};
//----------------------------------------------------------//
//Original expression
public static bool IsEven(int num)
{
  return num % 2 == 0;
}

bool hasEvenNumber = Array.Exists(numbers, 
                                  IsEven);
//----------------------------------------------------------//
//Lambda expression
bool hasEvenNumber = Array.Exists(numbers, 
                                  (int num) => num % 2 == 0 );

//Some code can be removed: 
// - The modulo operator (%) is only used with numbers*/
bool hasEvenNumber = Array.Exists(numbers, 
                                  (num) => num % 2 == 0 );

// - just one parameter, we don’t need the parentheses
bool hasEvenNumbers = Array.Exists(numbers, 
                                   num => num % 2 == 0 );
//----------------------------------------------------------//
Source

Also in C#: