UiARD Exam QuestionsBrowse all questions from this exam

UiARD 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?

Show Answer
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

1 comment
Sign in to comment
SmigooOption: D
Apr 13, 2024

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