[Solved] Using a foreach loop to loop through a list of TextBoxes [closed]
[ad_1] You need: foreach (TextBox element in list) { element.Text = “5.0”; } In your first code sample list[i] represents a single item in the list a TextBox, in your foreach loop you have element for the same thing. IMO, Usually, modification in foreach loop should be avoided, you might end up writing code, where … Read more