Timeline for Extension method to retrieve a sample from a collection
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 10, 2017 at 18:44 | answer | added | paparazzo | timeline score: 0 | |
May 10, 2017 at 14:52 | comment | added | Jesse C. Slicer |
Oh, one more: instead of return new List<T>(); , I would recommend return Enumerable.Empty<T>(); .
|
|
May 10, 2017 at 14:50 | comment | added | Jesse C. Slicer |
Two quick notes: mark _rnd as readonly and then when calling _rnd.Next(...) , surround it with a lock(_rnd) { ... } to ensure thread safety (keeping the same value from being returned from two threads calling at the same time).
|
|
May 10, 2017 at 14:00 | comment | added | Rick Davin | Suggest perhaps you rename parameters from 'values' to 'population' to help re-enforce the concept that the return Sample(s) are produced from a Population. | |
May 10, 2017 at 11:35 | answer | added | Peter Taylor | timeline score: 2 | |
May 10, 2017 at 11:32 | answer | added | t3chb0t | timeline score: 1 | |
May 10, 2017 at 11:02 | comment | added | venerik | It's domain specific: A sample is a subset of a population. | |
May 10, 2017 at 10:59 | comment | added | t3chb0t |
Is Sample a real name for something domain specific or is this just meant as an example?
|
|
May 10, 2017 at 10:57 | history | asked | venerik | CC BY-SA 3.0 |