In a class I'm writing, if a bad value is sent to a property, I'd like to raise an error, so that when the class is being used, a Try...Catch...Finally block can work with it.
Would I use an Err.Raise statement in here:
VB Code:
Property LastName() As String Get LastName = m_sLastName End Get Set(ByVal Value As String) If Value = "MENDHAK" Then [b]'Err.Raise ???[/b] Else m_sLastName = Value End If End Set End Property




Reply With Quote