The following shows a static generic method with a USING phrase that declares the generic argument T. This generic argument is constrained to implement the type System.IComparable. The method expects two parameters both of which must be of the same type as the generic argument.
method-id Min using T static. constraints. constrain T implements type System.IComparable. procedure division using by value item1 as T item2 as T returning res as T. if item1::CompareTo(item2) < 0 set res to item1 else set res to item2 end-if end method.
In this case the CompareTo method may be invoked since T is known to implement the IComparable interface.