16 Jul 2013•less than a minute read•9851 views
Evenly splitting / distributing a list of objects using linq and extension methods
My resolution to the following problem. Given I have X apples and Y baskets, how can I evenly split the apples into each of the baskets. To do this I ended up creating an IEnumerable extension method that can be applied to the source (apples)
#linq#extension-methods#splitting#stackoverflow#csharp