I have multiple nested foreach loops that do some processing, how can I convert this expression to Linq?
slug.Text = "";
foreach (var script in slugItem.script) {
foreach (var body in script.body) {
foreach (var vo in body.vo) {
foreach (var content in vo.content) {
foreach (var text in content.text) {
slug.Text = string.Format("{0}\n{1}", slug.Text, text.Value);
} } } } }
1 Answer