Between method

Jul 13, 2010 at 10:20 AM
It would be really nice to have Between method for Dates and Number data types.
Jul 13, 2010 at 4:05 PM
Edited Jul 13, 2010 at 4:05 PM

DateTime IsWithinRange() method is available here: http://www.codeproject.com/KB/cs/Utilities.aspx along with many other helpful extensions. I don't see anything in there for checking numeric ranges.

The extensions on that page are not in my package or in the "more.txt" list of others that I wanted to check.

Coordinator
Jul 15, 2010 at 10:42 AM

The project already contains an IsBetween method which is extending IComparable. That means the method is not only available on DateTime and numerical values but also any other (value or reference) type supporting that interface.