How to add a range of items to an IList?
If you look at the C# source code for List<T>, I think List<T>.AddRange() has optimizations that a simple loop doesn’t address. So, an extension method should simply check to see if the IList<T> is a List<T>, and if so use its native AddRange(). Poking around the source code, you see the .NET folks do similar … Read more