讀取文字檔到字串
   string text = System.IO.File.ReadAllText(ConfigPath, System.Text.Encoding.Default);
字串(寫)存到文字檔
  System.IO.File.WriteAllText(ConfigPath, text, System.Text.Encoding.Default);



如果不加System.Text.Encoding.Default,可能會發生中文亂碼的現象。
arrow
arrow
    全站熱搜

    戮克 發表在 痞客邦 留言(0) 人氣()