Tim Camper

Tim Camper

  • NA
  • 10
  • 0

Compare 2 int arrays

Jul 22 2009 12:21 AM
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)