I need a collection that behaves as Set and preserves order of element insertion.
Is there one or I'll have to implement it myself?
What would the best implementation be?
It doesn't exist in .NET, but you can emulate it using a List
and the Distinct
LINQ extension method, which should preserve the order of the underlying List
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With