Exam UiARD All QuestionsBrowse all questions from this exam
Question 62

A developer wants to add items to a list of strings using the Invoke Method activity. The list is declared as follows:

The Invoke Method has the following properties:

The Parameters property is as follows:

Based on the information shown in the exhibits, what is the outcome of the Invoke Method activity?

    Correct Answer: A

    The Invoke Method activity is configured to add an item to the 'Colors' list. However, the 'Colors' list is not instantiated, as indicated by the empty 'Default' field in the variable declaration. Invoking a method on an uninstantiated list will throw an exception because the list object is null. Therefore, an exception will be thrown.

Discussion
soulebiOption: A

Tried this in studio. There was an error "value cannot be null on TargetObject. " In the problem the List Colors was not instantiated ( new List(of String) ) so there wil be an error. Correct answer is a

IngvarnOption: A

Ans : A, Invoke Method: Value cannot be null. (Parameter 'TargetObject')

Ingvarn

Not because of Value cannot be null. (Parameter 'TargetObject'), The reason is because of list has not been declared before. If the list has been declared - only yellow.

Alex_RPAOption: A

Respuesta es A, el método add no puede agregar elementos a algo vacío.

bhaskar5a5Option: A

Ans : A

MirjalolOption: A

Invoke Method: Value cannot be null. (Parameter 'TargetObject')

Engineer24Option: A

Sorry i wanted to say the correct Answer is A.

Engineer24Option: B

If you test this example in studio will throw an exception on the Invoke method activity. 23.4.0-beta.12701+Branch.release-v23.4.0.Sha.f28ab212a5325cf466c152fb914c55858f5a423c Source: Invoke Method Message: Value cannot be null. (Parameter 'TargetObject') Exception Type: System.ArgumentNullException