filesteam 问题
try
                 {
                     fs = new FileStream(Program.VIDEOPATH + "progress.log", FileMode.Create, FileAccess.Write, FileShare.ReadWrite);
                     byte[] bts = ASCIIEncoding.ASCII.GetBytes(DateTime.Now.Ticks.ToString());
                     fs.Write(bts, 0, bts.Length);
                     fs.Flush();
                 }
                 catch (Exception e)
                 {
                     LoggerNS.Logger.writeToLog("Write process exception:"+e.Message);
                 }
                 finally
                 {
                     fs.Close();
                    // fs.Dispose();
                 }
总是出现错误The process cannot acccess the file 'c:\VideoFolder\progress.log' because it is being used by another process.
不知道是哪里的问题,又没有开别的程序,而且这是个单线程的程序,而且又用了try catch。为什么这么奇怪呢?
------解决方案--------------------请确保progress.log这个文件没有在使用中.是不是其他软件打开了progress.log?
------解决方案--------------------用别的文件试一下
------解决方案--------------------你在try前面没有个File.Crteate()函数?如果有的话,当图片文件不存在的时候 会报这个错误。
------解决方案--------------------建议你跟踪测试一下吧,
可能是参数没有传递吧
------解决方案--------------------关注。。。。。。。。。。
------解决方案--------------------还是好好调式吧
------解决方案--------------------简单做法,把"progress.log"换成"test.txt",试试。。。
------解决方案--------------------建议 seelp 一下 还有 你try catch 的话  catch不要去抓异常 就好了