Trace.TraceInformation Trace.TraceInformation Trace.TraceInformation Trace.TraceInformation Method

定義

將告知性訊息寫入 Listeners 集合中的追蹤接聽程式。Writes an informational message to the trace listeners in the Listeners collection.

多載

TraceInformation(String) TraceInformation(String) TraceInformation(String) TraceInformation(String)

使用指定的訊息,將告知性訊息寫入 Listeners 集合中的追蹤接聽程式。Writes an informational message to the trace listeners in the Listeners collection using the specified message.

TraceInformation(String, Object[]) TraceInformation(String, Object[]) TraceInformation(String, Object[]) TraceInformation(String, Object[])

使用指定的物件陣列和格式化資訊,將告知性訊息寫入 Listeners 集合中的追蹤接聽程式。Writes an informational message to the trace listeners in the Listeners collection using the specified array of objects and formatting information.

TraceInformation(String) TraceInformation(String) TraceInformation(String) TraceInformation(String)

使用指定的訊息,將告知性訊息寫入 Listeners 集合中的追蹤接聽程式。Writes an informational message to the trace listeners in the Listeners collection using the specified message.

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

參數

message
String String String String

要寫入的資訊訊息。The informative message to write.

備註

TraceInformation針對每個追蹤接聽程式呼叫Information方法,並以追蹤事件種類傳遞訊息字串形式的資訊訊息。TraceEventTraceInformation calls the TraceEvent method for each trace listener, with the trace event type Information, passing the informative message as the message string.

另請參閱

TraceInformation(String, Object[]) TraceInformation(String, Object[]) TraceInformation(String, Object[]) TraceInformation(String, Object[])

使用指定的物件陣列和格式化資訊,將告知性訊息寫入 Listeners 集合中的追蹤接聽程式。Writes an informational message to the trace listeners in the Listeners collection using the specified array of objects and formatting information.

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

參數

format
String String String String

包含零或多個格式項目的格式字串,其與 args 陣列中的物件相對應。A format string that contains zero or more format items, which correspond to objects in the args array.

args
Object[]

object 陣列,含有零或多個要格式化的物件。An object array containing zero or more objects to format.

備註

TraceInformation使用追蹤TraceEvent事件種類Information呼叫追蹤接聽程式中的方法, 並傳遞訊息內容做為具有格式資訊的物件陣列。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. 如需format和參數的詳細資訊, args請參閱方法。FormatSee the Format method for more information about the format and args parameters.

另請參閱

適用於