Invoke Method - Add / Adding to Dictionary

In the academy example Data Manipulation - Practice 3 - Dictonaries and Integers I do not understand where the integer value 1 is coming from when invoking the “Add” method.

When I remove the “Add winner to the list” activity and re-enter the same acitvity again it does not work anymore and gives this error: Practice3_Dictionaries_CompetitorsSummary.xaml: ‘Dictionary`2’ does not have a public instance method named ‘Add’ matching the parameter types, generic type arguments, and generic type constraints supplied to InvokeMethod ‘Invoke Method’.

How does this Invoke Method “Add” work exactly? I understand it takes the key from “WinnerName”, but where does the integer value 1 come from?

Thanks for any help.

Please see this answer: https://forum.uipath.com/t/use-of-invoke-method/1909/2?u=atoi

1 Like

Thanks for your help. I understand how it should work, but still I do not understand where the integer value of 1 is passed to the Activity in the given example on the Academy…

1 Like

Now I got it! Thanks a lot for your help. Issue solved: The integer value is passed in the Parameters!

2 Likes

You’re welcome @Andi_Erni

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.