C#文件写入操作
using System;
using System.IO;namespace IO操作
{class Program{static void Main(string[] args){using(StreamWriter w=File.AppendText("IO.txt")){TextIn("Hello GeoStorm", w);TextIn("Hello World",w);w.Close();}}public static void TextIn(string content, TextWriter w){w.Write("\r\n message:");w.WriteLine("{0}",content);w.Flush();}}
}
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎
總結
- 上一篇: C#中static void Main(
- 下一篇: C#读文件操作