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)
 
Back
Top