WebBaseEvent.ToString Method ()

Formats event information for display purposes.

Namespace: System.Web.Management
Assembly: System.Web (in system.web.dll)

public override string ToString ()
public String ToString ()
public override function ToString () : String
Not applicable.

Return Value

The event information.

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.

The following code example shows how to use the ToString method

// Implements the ToString() method.
public override string ToString()
    return base.ToString();

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions