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

Posted on 2011-05-12
Last Modified: 2012-05-11
In C# what is the function can be use it to loop on all controls belong the specified control
Question by:MKItani
    LVL 53

    Accepted Solution

    Just use a foreach loop

    FE: foreach (Control control in this.Controls)

    LVL 9

    Assisted Solution

    you can use following code:

    foreach (Control ctrl in panel1.Controls)
                    //do something here
    LVL 18

    Assisted Solution

    in Winform? Silveright/WPF? ASP.NET?

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Bit flags and bit flag manipulation is perhaps one of the most underrated strategies in programming, likely because most programmers developing in high-level languages rely too much on the high-level features, and forget about the low-level ones. Th…
    We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    This video discusses moving either the default database or any database to a new volume.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now