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