.NET BETWEEN方法
Between 值范围比较 可以判断一个值是否落在区间范围值中。 public static bool Between<T>(this T me, T lower, T upper) where T : IComparable<T> { return me.CompareTo(lower) >= 0 && me.CompareTo(upper) < 0; }
Between 值范围比较 可以判断一个值是否落在区间范围值中。 public static bool Between<T>(this T me, T lower, T upper) where T : IComparable<T> { return me.CompareTo(lower) >= 0 && me.CompareTo(upper) < 0; }