for ( int i=0 ; i < this.MyControl.TabPages.Count ; ) { this.MyControl.TabPages.Remove ( this.MyControl.TabPages[i] ); }
while (this.MyControl.TabPages.Count > 0) { this.MyControl.TabPages.Remove ( 0 ); }
Less than 50?
Then don't worry about the optimization until you have to port it to a PDP10.
No, over nine thousands.
No, way more than that.
while (this.MyControl.TabPages.Count > 0) { this.MyControl.TabPages.Remove ( this.MyControl.TabPages.Count-1 ); }