c# - Execute linq expression -


i have written query this

            var tmpquery = (from items x in items                             items2 y in items2                             select sb.appendline(string.format(format, y.name))); 

how can execute query? don't want result, have execution.

thank's

you cannot execute query without getting result - queries build results. appear trying execute code in loop, not build query. if want execute code in loop write loop , leave linq actual queries:

e.g. use:

 (x in items) {       (y in items2) {             sb.appendline(string.format(format, y.name);       }  } 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -