在使用File.Create()之后,另一个进程正在使用的文件
进程无法访问文件“myfile.ext”,因为其他进程正在使用它。
string filePath = string.Format(@"{0}\M{1}.dat", ConfigurationManager.AppSettings["DirectoryPath"], costCentre); if (!File.Exists(filePath)) {
File.Create(filePath); } using (StreamWriter sw = File.AppendText(filePath)) {
//write my text }
宝慕林4294392
摇曳的蔷薇
随时随地看视频慕课网APP
相关分类