Share via


ErrorMethod Property

ErrorMethod Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release. The method in which the error occurred.

Applies to

ControlGeneratedEventArgs Class

Syntax

Visual Basic .NET

Property ErrorMethod As String

C#

string ErrorMethod

Remarks

This property is read-only.

Examples

Visual Basic .NET

The following example shows a ControlGeneratedError Event handler function that displays the method in which the error occurred.

Private Sub OnControlGeneratedError(ByVal o As Object, ByVal e As EventArgs) _
    Handles treeView.ControlGeneratedError

     ' Declare the ControlGeneratedEventArgs object.
     Dim evtArgs As ControlGeneratedEventArgs

     ' Cast e to a ControlGeneratedEventArgs object.
     evtArgs = CType(e, ControlGeneratedEventArgs)

     Debug.WriteLine("Error occurred in: " + evtArgs.ErrorMethod)

End Sub

C#

The following example shows a ControlGeneratedError Event handler function that displays the method in which the error occurred.

void OnControlGeneratedError(object o, EventArgs e )
{
     // Cast e to a ControlGeneratedEventArgs object.
     ControlGeneratedEventArgs evtArgs = (ControlGeneratedEventArgs)e;

     Debug.WriteLine("Error occurred in: " + evtArgs.ErrorMethod);

}

Send us your feedback about the Microsoft Exchange Server 2003 SDK.

Build: June 2007 (2007.618.1)

© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.