Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.48 KB | None | 0 0
  1.             for (int x = 0; x < testarray.Count; x += 2)
  2.             {
  3.                 for (int y = x + 2; y < testarray.Count; y += 2)
  4.                 {
  5.                     if ((int)testarray[x] == (int)testarray[y] && (int)testarray[x + 1] == (int)testarray[y + 1])
  6.                     {
  7.                         testarray.RemoveAt(y);
  8.                         testarray.RemoveAt(y + 1);
  9.                         y = x + 2;
  10.                     }
  11.                 }
  12.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement