给text 添加文本,用AppendText()

来源:互联网 发布:centos 部署java web 编辑:程序博客网 时间:2024/05/16 09:34
Code:
  1. using System;  
  2.   
  3. using System.Collections.Generic;  
  4. using System.ComponentModel;  
  5. using System.Data;  
  6. using System.Drawing;  
  7. using System.Linq;  
  8. using System.Text;  
  9. using System.Windows.Forms;  
  10.   
  11. namespace WinForm6  
  12. {  
  13.     public partial class Form1 : Form  
  14.     {  
  15.         public Form1()  
  16.         {  
  17.             InitializeComponent();  
  18.         }  
  19.   
  20.         private void button1_Click(object sender, EventArgs e)  
  21.         {  
  22.             textBox1.AppendText(DateTime.Now.ToString()+'/n');//  
  23.             //附加文本用  AppendText()  效果最好!  
  24.               
  25.         }  
  26.     }  
  27. }  
  28.