Writes a category name and message to the trace listeners in the Trace.Listeners collection if a condition is true.
By default, the output is written to an instance of System.Diagnostics.DefaultTraceListener.
The category parameter can be used to group output messages.
This method calls the TraceListener.Write(string) method of the trace listener.