public static T Min <T>(T v1, T v2) { return(Operator.LessThanOrEqual(v1, v2) ? v1 : v2); }
/// <summary> /// Evaluates binary less-than-or-equal (<=) for the given type; this will throw /// an InvalidOperationException if the type T does not provide this operator, or for /// Nullable<TInner> if TInner does not provide this operator. /// </summary> public static bool LessThanOrEqual <T>(T value1, T value2) { return(Operator <T> .LessThanOrEqual(value1, value2)); }