예제 #1
0
 public static CsCodeWriter SingleLineForeach(this CsCodeWriter cs, string variable, string collection, string statement)
 {
     cs.WriteLine($"foreach (var {variable} in {collection})");
     cs.IncIndent();
     cs.WriteLine(statement);
     cs.DecIndent();
     return(cs);
 }