Exam UiARD All QuestionsBrowse all questions from this exam
Question 229

A developer reviews a workflow where filenames will be stored in a collection. The collection is initialized with a single filename. If adding a new filename to the collection, which collection variable type will result in an error?

    Correct Answer: D

    An array has a fixed size once it is initialized. Therefore, adding a new filename to an array that was initialized with a single filename would result in an error since its size cannot be dynamically changed. Other collection types like List and Dictionary allow for dynamic resizing and adding elements without any such restrictions.

Discussion
SmigooOption: D

We can't add namespaces to System.Array after it's created.