I’m not looking for how, I’m looking for why? I couldn’t find a straight forward answer to this.
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.
Yes. CollectionBase was a previous attempt, and a way to provide type safety.
Generics give you these advantages, but add two more HUGE advantages:
Edit:
I thought of a couple of other compelling reasons to move your code to using generic collections:
Cast<T>(CollectionBase does not implementIEnumerable<T>, onlyIEnumerable).