List.AddRange() exists, but IList.AddRange() doesn’t.
This strikes me as odd. What’s the reason behind this?
List.AddRange() exists, but IList.AddRange() doesn’t. This strikes me as odd. What’s the reason behind
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Because an interface shoud be easy to implement and not contain “everything but the kitchen”. If you add
AddRangeyou should then addInsertRangeandRemoveRange(for symmetry). A better question would be why there aren’t extension methods for theIList<T>interface similar to theIEnumerable<T>interface. (extension methods for in-placeSort,BinarySearch, … would be useful)