Design Question

  • Thread starter Thread starter Will
  • Start date Start date
W

Will

I'm getting this error (system stack overflow) when attemping to
instantiate a hastable or assigning a new hastable to the class
property. I have a "base" class that uses the MustInherit keyword and
I believe this is the cause...Every business rule must inherit from
the base class...Am I using the class/key words correctly...base class
below:

Imports System.Web.UI.Page
Imports System.Web.UI.WebControls.Label

Namespace BusinessRules
Public MustInherit Class AbstractBusinessRule
Public Property mErrors() As System.Collections.Hashtable
Get
Return mErrors
End Get
Set(ByVal pErrors As System.Collections.Hashtable)
mErrors = pErrors
End Set
End Property
MustOverride Function Validate(ByVal pRecordNumber As Integer,
ByVal pPortRecord As DataRow, _
ByRef pErrLabel As Label)
Protected Function SetError(ByVal pErrorField As String, ByVal
pErrorMessage As String)
mErrors.Add(pErrorField, pErrorMessage)
End Function
Event FinishedValidation(ByVal RetVal As Integer)
End Class
End Namespace

Thanks
 
Stack overflows almost always occur due to infinite looping or infinite
recursion. Either of these situations can be created indirectly. That's what
I would look for first.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Back
Top