UiPath Automation Developer Professional v1 — Question 82
A developer examines a workflow in which filenames are stored within a collection. The collection is initialized with a single filename. When adding a new filename to the collection, which collection variable type will cause an error?
Answer options
- A. System.Collections.Generic.Dictionary
- B. System.Collections.Generic.List
- C. System.Array
- D. System.Data.DataTable
Correct answer: C
Explanation
The correct answer is C, System.Array, because arrays in .NET have a fixed size once initialized, preventing the addition of new elements. In contrast, System.Collections.Generic.Dictionary, System.Collections.Generic.List, and System.Data.DataTable all allow for dynamic resizing or addition of elements.