清空一个panel上的文本框的值的函数

foreach (Control control in this.TpChange.Controls)
            {
                //MessageBox.Show(control.GetType().ToString());
                if (control.GetType().ToString() == "System.Windows.Forms.RichTextBox")
                {
                    ((System.Windows.Forms.RichTextBox)control).Text = "";
                }
            }
原文地址:https://www.cnblogs.com/bestsaler/p/1835890.html