相关文章推荐

Would be nice to have AddRange(IEnumerable<T> collection) in IList<T> interface (or better to ICollection<T>) #1302

Open
@flamaniac

Description

Luck of many methods or extansions for the IList i forcing to pass list implementation everywhere. Thats why IList interface is not flexible.

List allApplicableVariants = new List();
IEnumerable filteredVariants = ...;
allApplicableVariants .AddRange(filteredVariants)

is posibble but this is not :

IList allApplicableVariants = new List();
IEnumerable filteredVariants = ...;
allApplicableVariants .AddRange(filteredVariants); // ;(

 
推荐文章