I have 4 textboxes that I need to run the same function on. Instead of typing out the function 4 times I want to be able to run a loop that does it for me. I'm not sure how to go about doing this. The text boxes are all named as such txtblah1 txtblah2 txtblah3 txtblah4. The function takes in txtblah1.Text. How would I loop through changing the 1 to a 2 and so on?
Code:
 double 5gtr1 = Calculate(txt5Gtr1.Text, .45);
 double 5gtr2 = Calculate(txt5Gtr2.Text, .45);
 double 5gtr3 = Calculate(txt5Gtr3.Text, .45);
 double 5gtr4 = Calculate(txt5Gtr4.Text, .45);
^Is an example of the code I have. I want to turn it into one simple loop instead.