Use List(T) ForEach method instead of foreach Petros 17 years ago If you have the right .NET version you can use: