This package provides an easy way to randomly remove and return elements from an IEnumerable implementation, such as a List object.
- Instantiate a class of type
ListPicker
- Access the method
PickElements
from the instatiated class - Pass, as parameters, an instance of any implementation of
IEnumerable <T>
such as aList<T>
, pass the number of elements you want pick from the list and, optionally, pass aFunc<T, bool>
that represents a condition to pick an element.
See the Samples Project in the repository files for examples.
In the folder TestResults we have a detailed report with the unit tests' code coverage
This package can also be accessed through Nuget Package Manager by the nome of JIgor.Projects.ListPicker.
Through CLI
Install-Package JIgor.Projects.ListPicker -Version 1.0.0