How to split string under C# not VB in Uipath Studio

Pls refer to this picture, I establish a C# process, wish to use Split(),
while it reports error. Any suggestion would be appreciated!

Please like given below

Split(str,",").ToArray

The output will be an array, you can put in message box. Just loop through then use message box on it.

Thank you.

try out this syntax

str.Split(","c)

str must be declared in array variable (ex array of strings)

Thanks,

Hi,

We need to use single quote to express char type in C#. So can you try the following?

str.Split(',')

However, this returns array. If we need to express all items, the following works for example.

String.Join(" ",str.Split(','))

FYI

Regards,

Oops. I given the code in VB.

Please see the below for C#



image

Hope this will be helpful. Thank you.