That works, the object just sets Start to 2, and End to 5. There are cases where we want a validated range - that is, start should be less than or equal to end, and throw an exception otherwise.
Therefore:
◾Unseal Range
◾Create ValidRange that inherits from Range and adds that validation in the constructor.
Right now if I do this:
That works, the object just sets Start to 2, and End to 5. There are cases where we want a validated range - that is, start should be less than or equal to end, and throw an exception otherwise.
Therefore: ◾Unseal Range
◾Create ValidRange that inherits from Range and adds that validation in the constructor.