C# 写入数据到文本文档

来源:互联网 发布:在cmd运行java 编辑:程序博客网 时间:2024/06/02 04:32
                        string fullPath = Application.StartupPath + "\\Number.txt";                        if (System.IO.File.Exists(fullPath))                        {                            using (StreamWriter sw = new StreamWriter(fullPath,true,Encoding.Default))                            {                                sw.WriteLine(textBox3.Text+"    "+DateTime.Now);                            }                        }