Use foreach for form button controls

Sergio23 271 Reputation points
2021-07-05T13:46:18.267+00:00

To list all TextBoxes, do I need to list all controls?
Example
foreach (Control InitCtrl in this.Controls)

Can you be more specific?
Example
foreach (TextBox TxtBx in ?????)

Can it be done?
How?
Thanks

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,245 questions
0 comments No comments
{count} votes

0 additional answers

Sort by: Most helpful