I want a "IsBetween" extension on number types (just int in the experiment) which I can chose if the boundary are inclusive or exclusive.
12.IsBetween<Including, Excluding>(0, 20)
This was a lot easier than I thought, I defined a common interface IIntervalBoundary and two implementations Inclusive and Exclusive with private constructors and public implicit operators.
Main Idea:
I want a "IsBetween" extension on number types (just int in the experiment) which I can chose if the boundary are inclusive or exclusive.
This was a lot easier than I thought, I defined a common interface IIntervalBoundary and two implementations Inclusive and Exclusive with private constructors and public implicit operators.