Szerkesztés

Megosztás a következőn keresztül:


TraceSource.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 object array and formatting information.

TraceInformation(String)

Source:
TraceSource.cs
Source:
TraceSource.cs
Source:
TraceSource.cs

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

public:
 void TraceInformation(System::String ^ message);
[System.Diagnostics.Conditional("TRACE")]
public void TraceInformation (string message);
[System.Diagnostics.Conditional("TRACE")]
public void TraceInformation (string? message);
[<System.Diagnostics.Conditional("TRACE")>]
member this.TraceInformation : string -> unit
Public Sub TraceInformation (message As String)

Parameters

message
String

The informative message to write.

Attributes

Exceptions

An attempt was made to trace an event during finalization.

Remarks

The TraceInformation method provides an informational message intended to be read by users and not by tools.

TraceInformation(String) calls the TraceEvent(TraceEventType, Int32, String) method, setting eventType to TraceEventType.Information and passing the informative message as the message string. The TraceEvent(TraceEventType, Int32, String) method in turn calls the TraceEvent(TraceEventCache, String, TraceEventType, Int32, String) method of each trace listener.

Applies to

TraceInformation(String, Object[])

Source:
TraceSource.cs
Source:
TraceSource.cs
Source:
TraceSource.cs

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

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

Parameters

format
String

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

args
Object[]

An array containing zero or more objects to format.

Attributes

Exceptions

format is null.

format is invalid.

-or-

The number that indicates an argument to format is less than zero, or greater than or equal to the number of specified objects to format.

An attempt was made to trace an event during finalization.

Remarks

For more information about the format parameter, see Composite Formatting.

The TraceInformation method provides an informational message intended to be read by users and not by tools.

TraceInformation(String, Object[]) calls the TraceEvent(TraceEventType, Int32, String, Object[]) method, setting eventType to TraceEventType.Information and passing the message content as an object array with formatting information. The TraceEvent(TraceEventType, Int32, String, Object[]) method in turn calls the TraceEvent(TraceEventCache, String, TraceEventType, Int32, String, Object[]) method of each trace listener.

See also

Applies to