I would create an array of values:
public string[] prints;
You'll, of course, have to initialize it with the number of values you want to hold:
prints = new string[5]; // Holds five strings
Then, you can loop through them as such:
foreach (var number in prints) // Loop through each string in prints
{
string printNumber = String.Format("print{0}", number);
}
If you want to be able to dynamically add or remove strings for prints
, you should probably use a List<string>
instead of a string[]