본문 바로가기

Study/Programming

C# 모든 TextBox 초기화


                //TextBox 초기화
                foreach (Control ctl in this.Controls)
                {
                    if (typeof(System.Windows.Forms.TextBox) == ctl.GetType())
                    {
                        ctl.Text = null;
                    }
                }