Läs på engelska Redigera

Dela via


Trace.TraceInformation Method

Definition

Writes an informational message to the trace listeners in the Listeners collection.

Overloads

TraceInformation(String)

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

TraceInformation(String, Object[])

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

TraceInformation(String)

Source:
Trace.cs
Source:
Trace.cs
Source:
Trace.cs

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

C#
[System.Diagnostics.Conditional("TRACE")]
public static void TraceInformation(string? message);
C#
[System.Diagnostics.Conditional("TRACE")]
public static void TraceInformation(string message);

Parameters

message
String

The informative message to write.

Attributes

Remarks

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

See also

Applies to

.NET 10 och andra versioner
Produkt Versioner
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

TraceInformation(String, Object[])

Source:
Trace.cs
Source:
Trace.cs
Source:
Trace.cs

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

C#
[System.Diagnostics.Conditional("TRACE")]
public static void TraceInformation(string format, params object?[]? args);
C#
[System.Diagnostics.Conditional("TRACE")]
public static void TraceInformation(string format, params object[] args);

Parameters

format
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.

Attributes

Remarks

TraceInformation calls the TraceEvent methods in the trace listeners with the trace event type Information, 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

.NET 10 och andra versioner
Produkt Versioner
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1