[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 289
  • Last Modified:

In C# what is the function can be use it to loop on all controls belong the specified control

In C# what is the function can be use it to loop on all controls belong the specified control
0
MKItani
Asked:
MKItani
3 Solutions
 
DhaestCommented:
Just use a foreach loop

FE: foreach (Control control in this.Controls)

0
 
gery128Commented:
you can use following code:

foreach (Control ctrl in panel1.Controls)
            {
                //do something here
            }
0
 
dj_alikCommented:
in Winform? Silveright/WPF? ASP.NET?
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now