New IList<T> extension method - Swap#13
Conversation
|
Hello @falwickster , Thank you for your contribution. This project is currently still on hold on our side for a few weeks (we have to many requests) but we will certainly look at it when we will be able. Beside this, I'm this not sure if I like the second implementation or not. We probably expect when swapping an item, the same position will remain as your first implementation. Jonathan Performance Libraries Runtime Evaluation |
|
Hello @JonathanMagnan, Thanks for feedback. I replaced this ICollection method to IList method, because as far as I know ICollection doesn't store indexes, so swaping items with keeping its position is problematic. Best Regards |
|
Thank a lot ;) Best Regards, Jonathan |
|
Hello @falwickster , Sorry for the long waiting, we had to complete the support to .NET Standard first. Your method has been added Thank you for your contribution ;) Best Regards, Jonathan |
Hello
This is my first pull request, this is a new extension method to replace an item in a collection when the item we want to change exists in a collection. Otherwise it won't make any changes.
EDIT: I have noticed that all ICollection methods are void or bool, so I rewrote the method to be void. I have it on my fork.