noob question on c#: how to create a one-dimensional dynamic array? And how to change it later?
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.
Instead of using an array, you can use the
List<>object in C#.To iterate on items contained in the list, use the
foreachoperator :You can add items in the list object with
Add()andRemove()functions.You can convert a
List<T>to an array using theToArray()function :Here is the documentation on
List<>object.