|
using System;
namespace Business
{
public static class RangeExtensions
{
public static bool Between<T>(this IComparable<T> value, IRange<T> range) where T : IComparable<T>
{
return value.CompareTo(range.Start) >= 0 && value.CompareTo(range.End) <= 0;
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
My name is Idalgo Cantelli. I'm a software developer skilled in .Net technologies. I work with .Net since February, 2002. I also have a strong experience as a technical trainer, having taught in more than thirty classroom courses. I'm MCTS and MCPD-EAD on .Net 2.0, planning an upgrade to 3.5.