How to Combine multiple String array in 1 string array

hi I am trying to combine this array list of File as attachment’s

image

but my code is not working

any advise?

thank you in advance
-Vincent

2 Likes

Hi

First let’s combine all the array to one array with concat like this and then use that in string.Join method

String.Join(“”, arr.Concat(arr2).Concat(arr3).Concat(arr4).ToArray)

Cheers @Vincent_Nuestro

2 Likes

When a string is needed

when a string array is needed:
arr1.concat(arr2).concat(arr3).toArray

or working with selectMany method for the prototype:
grafik

Working with variables as mentioned by @Yoichi

1 Like

Hi,

FYI, another solution:

{arr1,arr2,arr3}.SelectMany(Function(a) a).ToArray()

Regards,

1 Like

hi @Palaniyappan
i got an error

the argument was configured to a string array, the assigned value is a string. Here is the mismatch

1 Like

Hi

Pls change the type of that argument as STRING

We are using String.Join method which will give us string as output

Cheers @Vincent_Nuestro

1 Like

Or if you want to pass that as array of string
Then have this alone in the expression

arr.Concat(arr2).Concat(arr3).Concat(arr4).ToArray

Cheers @Vincent_Nuestro

1 Like

Is it resolved @Vincent_Nuestro

1 Like

hi @Palaniyappan thank you so much,

it works now

1 Like

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