Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
TraceError Method (String, Object[])
Collapse the table of content
Expand the table of content

Trace.TraceError Method (String, Object[])

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

Namespace:  System.Diagnostics
Assembly:  System (in System.dll)

[ConditionalAttribute("TRACE")]
public static void TraceError(
	string format,
	params Object[] args
)

Parameters

format
Type: System.String

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

args
Type: System.Object[]

An object array containing zero or more objects to format.

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.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft