System [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00] 1.0.3300.0 1.0.5000.0 2.0.0.0 4.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. System.Diagnostics.TraceListener

The class provides the property to get or set the text writer that receives the tracing or debugging output.

This class also provides methods to the so that it no longer receives tracing or debugging output, to the output buffer for the , and to a message to the .

You must enable tracing or debugging to use a trace listener. The following syntax is compiler specific. If you use compilers other than C# or Visual Basic, refer to the documentation for your compiler.

To enable debugging in C#, add the /d:DEBUG flag to the compiler command line when you compile your code, or you can add #define DEBUG to the top of your file. In Visual Basic, add the /d:DEBUG=True flag to the compiler command line.

To enable tracing in C#, add the /d:TRACE flag to the compiler command line when you compile your code, or add #define TRACE to the top of your file. In Visual Basic, add the /d:TRACE=True flag to the compiler command line.

To add a trace listener, edit the configuration file that corresponds to the name of your application. Within this file, you can add a listener, set its type and set its parameter, remove a listener, or clear all the listeners previously set by the application. The configuration file should be formatted like the following example.

`<configuration> <system.diagnostics> <trace autoflush="false" indentsize="4"> <listeners> <add name="myListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="TextWriterOutput.log" /> <remove name="Default" /> </listeners> </trace> </system.diagnostics> </configuration>`

If an attempt is made to write to a file that is in use or unavailable, the file name is automatically prefixed by a GUID.

Directs tracing or debugging output to a or to a , such as .

- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  This constructor uses the stream as the recipient of the tracing or debugging output. Its is initialized to "TextWriter".

  Initializes a new instance of the class with as the output recipient.

- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  This constructor initializes the property to an empty string ("").

  Initializes a new instance of the class, using the stream as the recipient of the debugging and tracing output.

  A that represents the stream the writes to.
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  This constructor initializes the property to an empty string ("").

  Initializes a new instance of the class using the specified writer as recipient of the tracing or debugging output.

  A that receives the output from the .
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  This constructor initializes the property to an empty string ("").

  Initializes a new instance of the class, using the file as the recipient of the debugging and tracing output.

  The name of the file the writes to.
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  This constructor initializes the property to the parameter or to an empty string (""), if the parameter is null.

  Initializes a new instance of the class with the specified name, using the stream as the recipient of the debugging and tracing output.

  A that represents the stream the writes to.
  The name of the new instance.
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  To be added

  Initializes a new instance of the class with the specified name, using the specified writer as recipient of the tracing or debugging output.

  A that receives the output from the .
  The name of the new instance.
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  This constructor initializes the property to the parameter or to an empty string (""), if the parameter is null.

  Initializes a new instance of the class with the specified name, using the file as the recipient of the debugging and tracing output.

  The name of the file the writes to.
  The name of the new instance.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void

  Calling a or method after calling automatically reopens the stream.

  Closes the so that it no longer receives tracing or debugging output.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void ``

  Use the method of the class to release the managed resources of a object.

  Disposes this object.

  true to release managed resources; if false, has no effect.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void To be added

  Flushes the output buffer for the .

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` To be added

  Writes a message to this instance's .

  A message to write.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` To be added

  Writes a message to this instance's followed by a line terminator. The default line terminator is a carriage return followed by a line feed (\r\n).

  A message to write.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.IO.TextWriter To be added: an object of type 'IO.TextWriter' To be added

  Gets or sets the text writer that receives the tracing or debugging output.