Open Eregerog opened 4 years ago
This has one issue: not all IEnumerables are ordered, e.g. enumerating a HashSet
may yield a random order.
I was originally about to suggest
Why not just
.IndexOf
and return -1 per convention?
Well, This approach saves a line, which is nice. And the naming fits the standard library, so that is okay.
Anyways, will think about the problem with a lack of order.
At some point I needed this method, so i implemented it. Might we worth putting into the corelib