The following program example are from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemiofileclassgetattributestopic.asp
After I compile on VS2005, and run it in console, got error:
The process failed: System.IO.IOException: The process cannot access the file
'c
It will run well when MyTest.txt exists.
My original question is, I want to create empty file and change its
lastwritetime, but it always give error unless I wrap the create line in
using(FileStream
c**r 发帖数: 10001
2
yes File.Create(path).close() makes it work, thanks.