Based on the information shown in the exhibits, what is the outcome of the Invoke Method activity?
A developer wants to add items to a list of strings using the Invoke Method activity.
The list is declared as follows:
Based on the information shown in the exhibits, what is the outcome of the Invoke Method activity?
A . Colors will contain an item with the value "Colors: Yellow".
B . Colors will contain an item with an empty value.
C . Colors will contain an item with the value "Yellow".
D . An exception will be thrown.
Answer: C
Explanation:
The Invoke Method activity is used to add items to a list of strings. In this case, the list is declared as “Colors”. The outcome of the Invoke Method activity will be that the list “Colors” will contain an item with the value “Yellow”. This is because the TargetObject property is set to “Colors”, which is the list variable, the MethodName property is set to “Add”, which is the method of the list class, and the Parameters property is set to “Yellow”, which is the value to be added to the list. (UiPath Studio documentation1)
References:
1: Invoke Method – UiPath Activities.
Latest UiPath-ADAv1 Dumps Valid Version with 60 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund