comparing two arrays in c#
<p>i have two arrays,each of them has 4elements in it,the elements are 1digit int numbers,i need to compare the first element of array2 with all the elements in array1.if the element has appeared in array1 in the same index as in array2,return 1...if it has appeared in array1  but not in the same index as array2,return 0....if it has not appeared in array1 at all,return -1.....</p>

<p>and then do the same for the other elements in array2...</p>

<p>for instance: array1:[3,4,5,8] and array2:[3,7,8,5]</p>

<p>the result should be something like this:[1,-1,0,0]</p>

<p>thanks so much:D</p>
