Invoke Python Method - how to add input parameters in C#?

Hi,

I can’t figure out how to add input parameters to the Invoke Python Method activity. I’m using C#, not VB and there are no examples for this in the documentation. Supposed to be an array or list, but neither seem to work.
https://docs.uipath.com/activities/other/latest/developer/invoking-a-python-script

Works like this in VB:
{2,3}

Doesn’t work similarly in C#:
{2,3};

Anybody knows how to do this?

Hi

Welcome to UiPath forum

when you are working with the Invoke Python Method activity and need to pass input parameters using C#, you should use the Object[] array to represent the input parameters

In assign activity
Object[] inputParameters = new Object[] { 2, 3 };

hope this helps

Cheers @CheesecakeX

2 Likes

This worked! Thanks a lot!

1 Like

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