I have a loop:
for (int i = 0; i < panel1->Controls->Count; ++i) {
Control^ ctl = panel1->Controls[i];
ctl->Location.Y = i*10;
}
Is it okay if I have 200 or 300 controls in panel1? Or it will be better if I add this:
if (ctl->Location.Y != i*10) ctl->Location.Y = i*10;
I just don't know if .NET's controls will repaint anyway (it will take time) or they will automatically check if there is no need to repaint (still same location)