Adding arrray values to another array

consider we have two variable of type string array with values,want to add all the values from those two variables to new array variable.
Help me to get this!!

1 Like

@anishakotian400

Check below for your reference

Hope this may help you

Thanks

Hi @anishakotian400

did u mean like this

d1 = {β€œ1”,β€œ2”}

d2= {β€œ3”,β€œ4”}

now thw output showuld be

d3 = {β€œ13”,β€œ24”}, is that what u are expecting ?

Let me know

Regards,
Nived N

d1 = {β€œ1”,β€œ2”}

d2= {β€œ3”,β€œ4”}

d3={β€œ1”,β€œ2”,β€œ3”,β€œ4”} want to get the result this way

Hi @anishakotian400

Try the expression below!

stringArray1.union(stringArray2).ToArray

where StringArray1={β€œ1”,β€œ2”}
Stringarray2={β€œ3”,β€œ4”}

Resultant array={β€œ1”,β€œ2”,β€œ3”,β€œ4”}

Regards

1 Like

Hi

int[] a = new int[] { 1, 2, 3, 4, 5 };
int[] b = new int[] { 6, 7, 8, 9, 10 };
int[] c = a.Union(b).ToArray();

Here a, b, c are array of integer variable

We can use the above expression in a assign activity

Hope this would help you resolve this

To learn different functions like this vb.net

Cheers @anishakotian400

grafik
Union will remove the duplicated B
Concat will add 2nd array on first

1 Like