我有多个嵌套的 foreach 循环进行一些处理,如何将此表达式转换为 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);
} } } } }