Hi, I need in a loop to rest of division; which one is more efficient?
Qt Code:
  1. for (i =0; .....i++) {
  2. //int r;
  3. //Math.DivRem(i+1, 2, out r);
  4. int r = (i + 1) % 2;
  5. if ( r == 0) return i;
  6. }
To copy to clipboard, switch view to plain text mode