c# - Parallel.For loop does not execute code after finished -
after parallel.for loop finished code below loop not executed. return statement not going executed if i'll set breakpoint program not reach it. have ideas why?
thank you
c canvas way.
here code:
parallel.for(0, playfield.last().field.getlength(0), x => { parallel.for(0, playfield.last().field.getlength(1), y => { if (playfield.last().field[x, y] == 1) { c.children.add(createrectangle(lengthx, lengthy, x, y)); } }); }); return c;
you exception on "c.children.add" because it's trying add controls crossthreaded. thats not allowed in wpf.
Comments
Post a Comment