Editar

Compartilhar via


WebBaseEvent.ToString Method

Definition

Formats event information for display purposes.

Overloads

ToString()

Formats event information for display purposes.

ToString(Boolean, Boolean)

Formats event information for display purposes.

ToString()

Formats event information for display purposes.

public:
 override System::String ^ ToString();
public override string ToString ();
override this.ToString : unit -> string
Public Overrides Function ToString () As String

Returns

The event information.

Examples

The following code example shows how to use the ToString method

// Implements the ToString() method.
public override string ToString()
{
    return base.ToString();
}
' Implements the ToString() method.
Public Overrides Function ToString() As String
    Return MyBase.ToString()

End Function 'ToString

Remarks

The ToString method is generally invoked by the provider that processes the event. The method ensures that the standard WebApplicationInformation object is provided with the event-specific data. It formats event information by calling the event-specific FormatCustomEventDetails method.

Note

When you format your custom event information for display, override the FormatCustomEventDetails method rather than the ToString method. This will avoid overwriting or tampering with sensitive system information.

Applies to

ToString(Boolean, Boolean)

Formats event information for display purposes.

public:
 virtual System::String ^ ToString(bool includeAppInfo, bool includeCustomEventDetails);
public virtual string ToString (bool includeAppInfo, bool includeCustomEventDetails);
override this.ToString : bool * bool -> string
Public Overridable Function ToString (includeAppInfo As Boolean, includeCustomEventDetails As Boolean) As String

Parameters

includeAppInfo
Boolean

true if standard application information must be displayed as part of the event information; otherwise, false.

includeCustomEventDetails
Boolean

true if custom information must be displayed as part of the event information; otherwise, false.

Returns

The event information.

Remarks

The ToString method is generally invoked by the provider that processes the event. It formats event information by calling the event-specific FormatCustomEventDetails method. If includeAppInfo is true, the standard WebApplicationInformation object is provided with the event-specific data.

Note

When you format your custom event information for display, override the FormatCustomEventDetails method rather than the ToString method. This will avoid overwriting or tampering with sensitive system information.

Applies to