Skip to content

Instantly share code, notes, and snippets.

@Collonville
Last active December 11, 2015 17:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Collonville/14926d44b70c4bbf949a to your computer and use it in GitHub Desktop.
Save Collonville/14926d44b70c4bbf949a to your computer and use it in GitHub Desktop.
static void Main(string[] args)
{
List<int> foo = new List<int> { 6, 1, 4, 9, 2 }; //list
List<int> boo = new List<int>(); //new list
foreach (var data in foo)
{
if (data >= 5)
{
boo.Add(data);
System.Console.WriteLine(data);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment