Possible Duplicate:
Linq equivalent of foreach for IEnumerable
Is there any linq style syntax for "For each" operations?
For instance, add values based on one collection to another, already existing one:
IEnumerable<int> someValues = new List<int>() { 1, 2, 3 };
IList<int> list = new List<int>();
someValues.ForEach(x => list.Add((x + 1));
Instead of
foreach(int value in someValues)
{
list.Add(value + 1);
}