共用方式為


WebEventFormatter.AppendLine(String) 方法

定義

將指定的字串和歸位字元 (Carriage Return) 附加至事件資訊。

public:
 void AppendLine(System::String ^ s);
public void AppendLine (string s);
member this.AppendLine : string -> unit
Public Sub AppendLine (s As String)

參數

s
String

要加入至事件資訊的字串。

範例

下列程式碼範例示範如何使用 AppendLine 方法。

  formatter.AppendLine(
       "*SampleWebBaseEvent Start *");

  // Display custom event information.
  formatter.AppendLine(customCreatedMsg);
  formatter.AppendLine(customRaisedMsg);
  formatter.AppendLine(firingRecordInfo);

  formatter.AppendLine(
"* SampleWebBaseEvent End *");
formatter.AppendLine("*SampleWebBaseEvent Start *")
formatter.AppendLine("Custom information goes here")
formatter.AppendLine("* SampleWebBaseEvent End *")
' Display custom event timing.
formatter.AppendLine(customCreatedMsg)
formatter.AppendLine(customRaisedMsg)

備註

方法 AppendLine 可讓您藉由新增自己的事件特定資料來自訂事件資訊。

適用於