What collection should I use from C# that suports generic only for adding elements ?
I tried using ArrayList, but I see that it’s a non-generic type.
Sorry if this is a duplicate. Thanks.
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.
Basic generic collection is
List<T>. It is in System.Collections.Generic namespace.You can use it for example this way:
Here is all the generic collections in C#