public static T Max <T>(T v1, T v2) { return(Operator.GreaterThanOrEqual(v1, v2) ? v1 : v2); }
/// <summary> /// Evaluates binary greater-than-on-eqauls (>=) 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 GreaterThanOrEqual <T>(T value1, T value2) { return(Operator <T> .GreaterThanOrEqual(value1, value2)); }