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

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -