Cags Posted April 2, 2004 Posted April 2, 2004 I am developing an application for pocket pc (so compact framework), this application will contain many tabpages with many controls on each. At certain points i will need to run through a list of strings calling methods from the control with the ID property matching the list entry. My current thinking is that I could achieve this by doing something abit like this.... // For each Item on list for(int i = 0; i < myStrings.Length; i++) { // For each Page for(int j = 0; j < TabPages.TabPages.Count; j++) { // For each Control for(int k = 0; k < TabPages[j].Controls.Count; k++) { If(myStrings[i] == TabPages[j].Controls[k].ID) { //Call Method bFound = true; break; } } if(bFound) { bFound = false; break; } } But this seems like it could be really slow... Another way I thought about doing it would be as I add each control to a tab page, I also add a reference to it to an arraylist. That way I would only have to loop through the list, and the arraylist. The problem with this is I'm worried it would use alot of resourse which are in short supply with the PocketPC. So my question really is, will that method be much quicker, and how many more resources is it likely to use... Quote Anybody looking for a graduate programmer (Midlands, England)?
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.