关于Winform保存到Txt文件里!!!!!!!!!!!!!
小弟我做了个货单,并且做了个 保存按纽,想保存到Txt文件里,我这可怜的书太垃圾了,跟本就没有!
请教下大哥们,我现在才注册好象有100分,但不知道怎么给,如果能给 我就给你们啊!!!!
[解决办法]
using System;using System.Collections.Generic;using System.Text;using System.IO;namespace ConsoleApplication10{ class Program { static void Main(string[] args) { try { StreamWriter sw = new StreamWriter("C:\\test.txt"); sw.WriteLine("Test"); sw.Close(); } catch (Exception ex) { Console.WriteLine("Err: " + ex.Message); } finally { Console.WriteLine("Write END"); } Console.ReadLine(); } }}