Create a method named ArrayCompare that compares between two arrays and returns a boolean indicating whether they contain exactly the same elements or not. Its input should be two integer arrays a and b. Its output should be a boolean, where it will return true if a and b contain the same elements and false otherwise
Hello, I am new to c#, and I would like to know how this is done. I read up some documents and I can only come up with this.
static bool ArrayCompare(int [] i , int [] j)
{
if (i.Length == j.Length)
{
for (int o = 0; o < i.Length; o++)
{
//I am stuck here
return false;
}
}
return false;
}
i[o]toj[o]at this place and check if they are identical.i[o]andj[o]are just integers and can be complared using==or!=