'function' : illegal comparison for references to managed class 'class'
You can compare references to managed types only for equality to see if they refer to the same object (==) or to different objects (!=).
You cannot compare them for ordering because the NGWS runtime might move managed objects at any time, changing the outcome of the test.