您当前的位置: 首页 >  c#

刘一哥GIS

暂无认证

  • 5浏览

    0关注

    934博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

C#文件写入操作

刘一哥GIS 发布时间:2015-06-08 21:32:53 ,浏览量:5

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();
        }
    }
}
关注
打赏
1665586602
查看更多评论
立即登录/注册

微信扫码登录

0.0540s