I have the following code that runs through a Do Loop and draws a certain amount of rectangles based on how many are specified in the numericUpDown control (1 through 8).
I would like to space the yloc a specific distance (say 75) every 2 rectangles (see attached picture).
Any thoughts on the best way?
graphicsObj = this.CreateGraphics();
Pen myPen = new Pen(System.Drawing.Color.Black, 1);
int i = 1;
int xLoc = 150;
int yloc = 200;
Rectangle myRectangle = new Rectangle(xLoc, yloc, 50, 25);
//xLoc = xLoc + 50;
yloc = yloc + 25;
} while (i <= numericUpDown.Value);