Compiler Error C2865
TOC
Collapse the table of content
Expand the table of content
This documentation is archived and is not being maintained.

Compiler Error C2865

Error Message

'function' : illegal comparison for handle_or_pointer

You can compare references to Classes and Structs (Managed) or __gc 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 .NET runtime might move managed objects at any time, changing the outcome of the test.

Show:
© 2016 Microsoft