示例#1
0
 public static T Max <T>(T v1, T v2)
 {
     return(Operator.GreaterThanOrEqual(v1, v2) ? v1 : v2);
 }
示例#2
0
 /// <summary>
 /// Evaluates binary greater-than-on-eqauls (&gt;=) for the given type; this will throw
 /// an InvalidOperationException if the type T does not provide this operator, or for
 /// Nullable&lt;TInner&gt; if TInner does not provide this operator.
 /// </summary>
 public static bool GreaterThanOrEqual <T>(T value1, T value2)
 {
     return(Operator <T> .GreaterThanOrEqual(value1, value2));
 }