funcky icon indicating copy to clipboard operation
funcky copied to clipboard

Experimental idea: IsBetween with explicit Inclusive and Exlusive boundaries

Open FreeApophis opened this issue 2 years ago • 1 comments

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.

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.

FreeApophis avatar Mar 01 '24 08:03 FreeApophis

Sorry for the noise, I was too eager in deleting branches 🙈

tautropfli avatar Feb 15 '25 15:02 tautropfli