LINQ query instead of Foreach

Thanks for your response.

I will find a solution.