亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

C#通過(guò)流寫(xiě)入一行數(shù)據(jù)到文件的方法

 更新時(shí)間:2015年07月15日 13:00:27   作者:pythoner  
這篇文章主要介紹了C#通過(guò)流寫(xiě)入一行數(shù)據(jù)到文件的方法,涉及C#針對(duì)文本文件讀寫(xiě)的基本技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下

本文實(shí)例講述了C#通過(guò)流寫(xiě)入一行數(shù)據(jù)到文件的方法。分享給大家供大家參考。具體如下:

using System;
using System.IO;
public class WriteFileStuff {
 public static void Main() {
  FileStream fs = new FileStream("c:\\tmp\\WriteFileStuff.txt", FileMode.OpenOrCreate, FileAccess.Write);      
  StreamWriter sw = new StreamWriter(fs);
  try {
    sw.WriteLine("Howdy World.");
  } finally {
    if(sw != null) { sw.Close(); }
  }
 }
}

希望本文所述對(duì)大家的C#程序設(shè)計(jì)有所幫助。

相關(guān)文章

最新評(píng)論