TextWriter.Synchronised Syntax question

  • Thread starter Thread starter Charles
  • Start date Start date
C

Charles

How do I get a synchronised textWriter in VB? I've tried
every variant I can think of.

Dim TxtWriter As TextWriter =
File.AppendText("c:\log.txt")
TxtWriter = TxtWriter.Synchronized
(TxtWriter)
 
That should have been

Dim TxtWriter As TextWriter =
File.AppendText("C:\log.txt")
Dim TxtWriter2 As TextWriter =
TextWriter.Synchronized(TxtWriter)
Dim FileListener As
TextWriterTraceListener = New TextWriterTraceListener
(TxtWriter2)
Trace.Listeners.Add(m_fileListener)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top