Specific data values fed to the RangeAttribute can trigger a DivideByZero exception and/or an OverflowException. These values have been pointed out by the Smart Unit Tests feature from Visual Studio 2015, and an image with the data values is attached.
The DivideByZero may happen by the user entering 0 as a step value.
The OverflowException is more serious as it highlights an implicit constraint saying “to > from” that is not stated anywhere. There should there be any need for that.
.
These issues are seen for all the RangeAttribute overloads.
Please let me know if you need any further information.
Pratap Lakshman
Specific data values fed to the RangeAttribute can trigger a DivideByZero exception and/or an OverflowException. These values have been pointed out by the Smart Unit Tests feature from Visual Studio 2015, and an image with the data values is attached.
The DivideByZero may happen by the user entering 0 as a step value.
.
The OverflowException is more serious as it highlights an implicit constraint saying “to > from” that is not stated anywhere. There should there be any need for that.
These issues are seen for all the RangeAttribute overloads.
Please let me know if you need any further information.
Pratap Lakshman