Trace.TraceWarning Trace.TraceWarning Trace.TraceWarning Trace.TraceWarning Method

定義

將警告訊息寫入 Listeners 集合中的追蹤接聽程式。Writes warning information to the trace listeners in the Listeners collection.

多載

TraceWarning(String, Object[]) TraceWarning(String, Object[]) TraceWarning(String, Object[]) TraceWarning(String, Object[])

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

TraceWarning(String) TraceWarning(String) TraceWarning(String) TraceWarning(String)

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

TraceWarning(String, Object[]) TraceWarning(String, Object[]) TraceWarning(String, Object[]) TraceWarning(String, Object[])

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

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

備註

TraceWarning使用追蹤TraceEvent事件種類Warning呼叫追蹤接聽程式中的方法, 並傳遞訊息內容做為具有格式資訊的物件陣列。TraceWarning calls the TraceEvent methods in the trace listeners with the trace event type Warning, 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.

另請參閱

TraceWarning(String) TraceWarning(String) TraceWarning(String) TraceWarning(String)

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

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

參數

message
String String String String

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

備註

TraceWarning使用追蹤TraceEvent事件種類Warning呼叫每個追蹤接聽項的方法, 並傳遞訊息字串形式的資訊訊息。TraceWarning calls the TraceEvent method for each trace listener with the trace event type Warning, passing the informative message as the message string.

另請參閱

適用於