write to temp file & delete it
Posted on 2005-05-02
I'm trying to write some text to a file:
StreamWriter sw = new StreamWriter(filePath, false))
then later i need to delete the file:
// get rid of the file
but i get an exception when i try to delete:
The process can not access the file 'C:\Documents and Settings\TREVORXPS\ASPNET\LOCALS~1\Temp\tmpA3.tmp' because it is being used by another process.
how do i solve this?
thanks - Trevor