mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-13 17:22:54 -05:00
13 lines
305 B
C#
13 lines
305 B
C#
using System;
|
|
|
|
namespace ChrisKaczor.HomeMonitor.Weather.Service
|
|
{
|
|
public static class Extensions
|
|
{
|
|
public static bool IsBetween<T>(this T item, T start, T end) where T : IComparable
|
|
{
|
|
return item.CompareTo(start) >= 0 && item.CompareTo(end) <= 0;
|
|
}
|
|
}
|
|
}
|