Skip to content

Instantly share code, notes, and snippets.

@csdear
Last active May 3, 2016 13:30
Show Gist options
  • Select an option

  • Save csdear/ec9e021aa3672915be70 to your computer and use it in GitHub Desktop.

Select an option

Save csdear/ec9e021aa3672915be70 to your computer and use it in GitHub Desktop.
Easy List and a Lambda Expression
//linqpad as C# Program...
//using System;
//using System.Collections.Generic;
//For finding one quick element...
class Program
{
static void Main()
{
List<int> list = new List<int>(new int[] { 19, 23, 29 });
// Finds first element greater than 20
int result = list.Find(item => item > 20 );
Console.WriteLine(result);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment