Can you think of any problems that overloading the SmartDate constructor to take an enum would cause. Example:
Public Enum EmptyDefault
Min
Max
End Enum
Public Sub New(ByVal emptyDefaultValue As EmptyDefault)
Me.New(emptyDefaultValue = EmptyDefault.Min)
End Sub
Public Sub New(ByVal value As Date, ByVal emptyDefaultValue As EmptyDefault)
Me.New(value, (emptyDefaultValue = EmptyDefault.Min))
End Sub
This would allow client code to explicitly specify what the empty default should be in a way that would be apparent to anyone looking at the code.
Example:
Private mEnded as New SmartDate(SmartDate.EmptyDefault.Max)
Thanks,
Kerry
Copyright (c) Marimer LLC