[personal profile] finesoul

    public static  Control FindControlRecursive(Control rootControl, string controlId)
    {
        Control foundControl;
        if (rootControl.ID == controlId) return rootControl;
        foreach (Control c in rootControl.Controls)
        {
            foundControl = FindControlRecursive(c, controlId);
            if (foundControl != null)  return foundControl;
        }

        return null;
    }

    public static T FindControlRecursive(Control rootControl, string controlId) where T : Control
    {
        Control ctrl = FindControlRecursive(rootControl, controlId);
        return ctrl as T;
    }

Лютий 2022

Н П В С Ч П С
  12345
6789101112
13141516171819
202122232425 26
2728     

За стиль дякую

Створено з Dreamwidth Studios
Сторінка створена 2026-Лют-12, Четвер 20:34