Answer the question
In order to leave comments, you need to log in
Can't figure out how async works?
As far as I understand (perhaps I misunderstood, correct me), in C# asynchronous methods must wait until the shared resource is freed, and then continue the task.
There is a method:
using(FileStream source = new FileStream(path, FileMode.Open))
{
using(FileStream target = new FileStream(newPath, FileMode.OpenOrCreate))
{
await source.CopyToAsync(target);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question