System.TGUID.operator Equality

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

class operator Equal(const Left, Right: TGUID): Boolean; inline;

Properties

Type Visibility Source Unit Parent
function public System.pas System TGUID

Description

Function to determine the equality of two TGUID values. Overloaded == operator.

operator Equality returns True if the two TGUID values given as parameters are equal, False otherwise.

 var a, b: TGUID;
 if (a = b) then
   ; // Do something

There is also a C++ implementation of the == operator:

 bool checkClassID(IPersist* p)
 {
   TGUID clsid;
   return SUCCEEDED(p->GetClassID(&clsid)) && (clsid == CLSID_MyObject);
 }

Note: Do not call the Equality operator directly. It is an overload of the compiler equality operation.

See Also