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.

C#
public override string ToString();

Returns

The event information.

Examples

The following code example shows how to use the ToString method

C#
// Implements the ToString() method.
public override string ToString()
{
    return base.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.

備註

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

.NET Framework 4.8.1 和其他版本
產品 版本
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

ToString(Boolean, Boolean)

Formats event information for display purposes.

C#
public virtual string ToString(bool includeAppInfo, bool includeCustomEventDetails);

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.

備註

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

.NET Framework 4.8.1 和其他版本
產品 版本
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1