ErrorConstant Property
Topic Last Modified: 2006-11-30
The low-priority error code, returned as a LocalizableErrors Enumeration. For a list of enumeration values and descriptions, see LocalizableErrors Enumeration. The ErrorConstant property applies to the ControlEventArgs Class.
Syntax
Property ErrorConstant As Integer
int ErrorConstant;
Remarks
This property is read-only.
Example
The following Visual Basic .NET example shows a ControlError Event handler function that displays the error type.
Private Sub OnControlError(ByVal o As Object, ByVal e As EventArgs) _
Handles treeView.ControlError
' Declare the ControlEventArgs object.
Dim evtArgs As ControlEventArgs
' Cast e to a ControlEventArgs object.
evtArgs = CType(e, ControlEventArgs)
Debug.WriteLine("Error constant: " + evtArgs.ErrorConstant)
End Sub
The following C# example shows a ControlError Event handler function that displays the error type.
void OnControlError(object o, EventArgs e )
{
// Cast e to a ControlEventArgs object.
ControlEventArgs evtArgs = (ControlEventArgs)e;
Debug.WriteLine("Error constant: " + evtArgs.ErrorConstant);
}