To adress Andy first, pointers in C# are normally avoided. They can be used, but functions that use them must be marked "unsafe", and the entire program must be compiled with an /unsafe flag. This also has the disadvantage of forcing lots of manual garbage cleanup and disabling other niceties that .Net normally takes care of in C# code. Not sure I really want to deal with the mess that will ensue if I use pointers right now.
As far as the example Jeff, do you know perhaps a better way to be doing this to avoid loops? I don't need to pass a number, it could be a string or really any type of data I can stuff into an array to keep track of what is where. The reason I chose a number is because they are easy to increment. My goal with this as an example is:
I want to have a situation where there can be a maximum of 8 groupboxes in the form, but if they are not all needed, less will be shown. Each groupbox contains identical controls (for example sake) to modify a text file 0-7. Now, the program does some checks to see if text file 0-7 exists right now, and if one doesn't, it disables the buttons for that text file. I'm getting to a point where it would be nicer to just not have the groupbox at all if one file isn't there. So, I am invisioning an internal array where:
control[0]=0;
control[1]=1;
control[2]=3; (because text file 2 doesn't exist)
...
And thus now having the program only show controls for files 0,1,3,4,5,6,7, and with no visible gap between 1 and 3 because the controls that normally would be shown for 2 are now modifying 3 and such.
And Roger, thanks for the heads up. That might actually become an issue for me, so I'll keep it in mind if I see issues of the program not closing.
I'm kinda brute forcing myself to learn C# in a method that I teach myself what I need at a certain point in this basic program. Most things I have found answers for, but this particular situation is difficult to search books/manuals/online for an answer.