본문 바로가기

Study/Programming

C# 모든 TextBox 초기화

반응형

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