Trace.TraceError Trace.TraceError Trace.TraceError Trace.TraceError Method

Definition

Writes error information to the trace listeners in the Listeners collection.

Overloads

TraceError(String) TraceError(String) TraceError(String) TraceError(String)

Writes an error message to the trace listeners in the Listeners collection using the specified message.

TraceError(String, Object[]) TraceError(String, Object[]) TraceError(String, Object[]) TraceError(String, Object[])

Writes an error message to the trace listeners in the Listeners collection using the specified array of objects and formatting information.

TraceError(String) TraceError(String) TraceError(String) TraceError(String)

Writes an error message to the trace listeners in the Listeners collection using the specified message.

public:
 static void TraceError(System::String ^ message);
[System.Diagnostics.Conditional("TRACE")]
public static void TraceError (string message);
static member TraceError : string -> unit
Public Shared Sub TraceError (message As String)
Parameters
message
String String String String

The informative message to write.

Remarks

TraceError calls the TraceEvent method for each trace listener, with the trace event type Error, passing the informative message as the message string.

See Also

TraceError(String, Object[]) TraceError(String, Object[]) TraceError(String, Object[]) TraceError(String, Object[])

Writes an error message to the trace listeners in the Listeners collection using the specified array of objects and formatting information.

public:
 static void TraceError(System::String ^ format, ... cli::array <System::Object ^> ^ args);
[System.Diagnostics.Conditional("TRACE")]
public static void TraceError (string format, params object[] args);
static member TraceError : string * obj[] -> unit
Public Shared Sub TraceError (format As String, ParamArray args As Object())
Parameters
format
String String String String

A format string that contains zero or more format items, which correspond to objects in the args array.

args
Object[]

An object array containing zero or more objects to format.

Remarks

TraceError calls the TraceEvent methods in the trace listeners with the trace event type Error, passing the message content as an object array with formatting information. See the Format method for more information about the format and args parameters.

See Also

Applies to