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
MKItaniAsked:
Who is Participating?
 
DhaestConnect With a Mentor Commented:
Just use a foreach loop

FE: foreach (Control control in this.Controls)

0
 
gery128Connect With a Mentor Commented:
you can use following code:

foreach (Control ctrl in panel1.Controls)
            {
                //do something here
            }
0
 
dj_alikConnect With a Mentor Commented:
in Winform? Silveright/WPF? ASP.NET?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.