{
if (obj is TextBox)
{
TextBox txt = obj as TextBox;
txt.Text = txt.Name;
txt.ForeColor = Color.Red;
}
}
用一次as转换就可以了
稍候 应改为 稍后
显示 应改为 显式