I have a bi-threaded c# application where both threads write to the same log and I'm getting an error.

```
'The process cannot access the file 'logfile.log' because it is being used by another process.'

```

I'm somewhat new to C# and multi-threading in general so if anyone can point me in the right direction here it would be much appreciated.