16 karma · joined Jul 13, 2011 (15y ago) · 12 submissions
comment 14y ago · link · parent
comment 14y ago · link · parent
comment 15y ago · link · parent
while (MyControl.TabPages.Count > 0) { MyControl.TabPages.RemoveAt(MyControl.TabPages.Count-1); }
For loop are nothing more than while loops with:
(1) an assignment (int i = MyControl.TabPages.Count in this case)
(2) an extra command (i-- in this case) added to the end
comment 15y ago · link · parent
As for variable naming, the better question is:
Why would you willingly choose less descriptive variable names when there are editors that will help you produce more readable code?