I have the following foreach loop:
var myString = "";
foreach (var item in myList)
{
myString += GetItems(item.ID);
}
Can this be converted to a List.ForEach. I was trying to do something like this:
myList.ForEach(s => GetItems(s.ID));
But I'm not sure how to return a string with concatenated ids this way.