导航

使用属性获取文本值的集合

Posted on 2006-04-15 11:15  Alex的Blog  阅读(132)  评论(0编辑  收藏  举报
1.用属性的只写操作

public string MyTextBox
  {
   set
   {
    this.txtAddVersion.Text = value;
    this.txtAddDate.Text = value;
    this.txtAddFunction.Text = value;
    this.txtAddSummary.Text = value;
    this.txtAddDescription.Text = value;
   }
     }

2.将属性的文本值集合清空

private void btnDelete_Click(object sender, System.EventArgs e)
  {
   MyTextBox = string.Empty;
  }