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.
7,516 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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
For example :
foreach (TextBox txtBox in this.Controls.OfType<TextBox>())
{
// code
}