Skip to content

Instantly share code, notes, and snippets.

@anakahala
Created May 20, 2013 11:29
Show Gist options
  • Select an option

  • Save anakahala/5611723 to your computer and use it in GitHub Desktop.

Select an option

Save anakahala/5611723 to your computer and use it in GitHub Desktop.
ループ版
List<int> intList = new List<int>() { 1, 2, 3, 4, 5, 6, 7, 8 };
List<int> resultList = new List<int>();
foreach (int i in intList)
{
if (i > 5)
{
break;
}
resultList.Add(i);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment