i want to know if can i re-open a handle after FileStream close it ??
this is mycode
static void Main(string[] args)
{
string path = "Hello";
SafeFileHandle handle = File.Open(path, FileMode.OpenOrCreate).SafeFileHandle;
using (FileStream fs1 = new FileStream(handle, FileAccess.ReadWrite))
{
// do some work
}
using (FileStream fs2 = new FileStream(handle, FileAccess.ReadWrite))
{
// do some work
}
Console.ReadKey();
}
i get error " the handle has been closed " in declaring fs2 .
Thanks :)