Shuffle in linq (part 2)

added by manudea
1/14/2012 6:51:32 AM

1 Kicks, 114 Views

There are many times when we need to randomly sort a list or array.


1 comments

resabio
1/21/2012 11:18:47 PM
Cannot comment on site, so I will comment here. The extension method doesn't force execution. Thus, although the solution will randomize code, it will also randomize it differently in each iteration. Not a bad idea, if intended, but dangerous to use in Framework development, as well, I can see a developer scratching his head why the order of this list keeps changing if s/he is not aware of the use of this solution in a previous chain of linq, a few calls deep.