Answers for "append 2 arrays c#"

C#
1

append 2 arrays c#

var z = new int[x.Length + y.Length];
x.CopyTo(z, 0);
y.CopyTo(z, x.Length);
Posted by: Guest on July-09-2020
0

c# add 2 arrays

public static int[] AddArrays(int[] a, int[] b)
{
    int[] newArray = new int[a.Length];
    for (int i = 0; i<a.Length; i++)
    {
        newArray[i]=a[i]+b[i];
    }
    return newArray;
}
Posted by: Guest on September-05-2020

C# Answers by Framework

Browse Popular Code Answers by Language