It's C# compiler restriction Cannot pass 'currentphoto' as a ref or out argument because it is a 'foreach iteration variable' and your solution is good to avoid this restriction.
Ramy Mahrous
Postaholic
2,196 posts since Aug 2006
Reputation Points: 480
Solved Threads: 276