I have this problem when I try to copy a file that was created in C#:
"System.IO.IOException: 'The process can not access the file' d:\las.txt 'because it is being used in another process.'"
my code:
using System; namespace modulo1 { class Program { static void Main(string[] args) { string folderName = @"c:\lasss"; System.IO.Directory.CreateDirectory(folderName); string archivo = @"d:\las.txt"; System.IO.File.Create(archivo); string dest = @"d:\soft"; //here is the problem System.IO.File.Copy(archivo, dest, true); } } }
How can i solve this problem???