現在のシステムのデフォルトのエンコードでファイルに書き込む
1921 ワード
FilePatch = Path.Combine(movie.SaveFolderPatch, " .txt");
FileInfo fi = new FileInfo(FilePatch);
if (fi.Exists)
fi.Delete();
FileStream fs = File.Open(FilePatch, FileMode.OpenOrCreate, FileAccess.Write);
textSave = "[ ]";
textSave += crlf;
textSave += " =" + movie.Actor;
textSave += crlf;
textSave += "\r";
textSave += crlf;
textSave += "[ ]";
textSave += crlf;
textSave += " =" + movie.wherefrom.ToString();
textSave += crlf;
textSave += " =" + movie.ProgNotes;
textSave += crlf;
textSave += " =" + movie.TypeName;
textSave += crlf;
textSave += "\r";
textSave += crlf;
textSave += "[ ]";
textSave += crlf;
textSave += " =" + movie.Recommend.ToString();
textSave += crlf;
textSave += " =" + movie.ProgLevel.ToString();
textSave += crlf;
textSave += " =";
textSave += crlf;
textSave += "\r";
textSave += crlf;
textSave += "[ ]";
textSave += crlf;
textSave += movie.Synopsis;
textSave += crlf;
Byte[] info = Encoding.Default.GetBytes(textSave);
fs.Write(info, 0, info.Length);
fs.Close();