# 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

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

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

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