I was wondering is there a way to run an input form a user as a command without using switch or if statements?
For example if I had a form that contained a 10 by 10 picture frame, and wanted to change its size to 100 by 100. Better yet, is there a way to use a string that is defined in code:
string newString = "";
then change the name of said string: newString = "newButton" + count;
This code would be used like so:
for (int count = 0; count < records) // Records being the count of records to be presented.
{
newString = "newButton" + count;
Button newString.ToString() = new Button();
} //Uses the newString to give ID name to the new buttons.
Some thing similar to this would be using java code to create a table for a servlet using the <tag> and the out_print command.
It seems like maybe you’re looking for a
Dictionary<T,T>. You could implement your loop idea like this: