Convert foreach to select statement I have below code written in foreach loop, I want to convert it to linq select method.