String to Array in C#

Hi All,

I am using C# in UiPath

I have a string data ‘a’,‘b’,‘c’ and would need to convert into list or array and loop through it

Can anyone suggest ?

Separate Data in different variable right @Abc_Xyz1 ?

It’s like this str1=‘a’,‘b’,‘c’

I have to split this and loop through these values

@Abc_Xyz1

Please try to use this

str.Split(',')

str is the variable where the string is stored

cheers

Am getting “an expression tree may not contain a call or invocation that uses optional arguments” erro

@Abc_Xyz1

Try this

str.Split(',',StringSplitOptions.None)

str,Split({','},StringSplitOptions.None)

cheers

VB
grafik

C#:
"'a','b','c'".Split(',').Select(x => x.Trim("'".ToCharArray())).ToArray();

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