I'm trying to use the Enterprise Library RangeValidator attribute to validate that a decimal value is greater than zero:
<RangeValidator(GetType(Decimal), "0.00", RangeBoundaryType.Exclusive, "1", RangeBoundaryType.Ignore, "MyMessage", "", Nothing, False, "", "")> _
Public Property Holding() As Decimal
Get
Return _Holding
End Get
Set(ByVal value As Decimal)
_Holding = value
End Set
End Property
However I get the compile error
Overload resolution failed because no accessible 'New' accepts this number of arguments.
As far as I can see I am using the overload correctly. It works fine if I remove the messageTemplate related parameters but I want to be able to specify a custom message.
Has anyone experienced this problem and overcome it?