Skip to content

Instantly share code, notes, and snippets.

@csdear
Created June 1, 2015 21:27
Show Gist options
  • Select an option

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

Select an option

Save csdear/3121dd6bb179dc08adb3 to your computer and use it in GitHub Desktop.
List & Foreach - Basic, Strongly Typed
//using System;
//using System.Collections.Generic;
//using System.Linq
//
class Program {
static void Main()
{
List <int> list = new List<int>() { 1, 2, 3, 3, 4, 4, 4 };
foreach (int value in list)
{
Console.WriteLine("Before: {0}", value);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment