5
Reply

Compare 2 int arrays

Tim Camper

Tim Camper

Jul 22 2009 12:21 AM
5.4k
Trying to compare 2 int arrays.

Example:

public static void Main()
    {
        int[] T1 = new int[3] { 1, 2, 3 };
        int[] D1 = new int[3] { 4, 5, 6 };

Would like to compare value T1 index[0...3] to D1 index[0...3].
There are 3 possibilities I am interested in and capturing.

1. are they equal
2 & 3. is one < or > then the other.

Any help on structuring a compare or equals statement would be appreciated.



Answers (5)
Next Recommended Forum