Share via


lock::operator==

Equality operator.

template<class T> bool operator==(
   T t
);

Parameters

  • t
    The object to compare for equality.

Return Value

Returns true if t is the same as the lock's object, false otherwise.

Example

// msl_lock_op_eq.cpp
// compile with: /clr
#include <msclr/lock.h>

using namespace System;
using namespace System::Threading;
using namespace msclr;

int main () {
   Object^ o1 = gcnew Object;
   lock l1(o1);
   if (l1 == o1) {
      Console::WriteLine("Equal!");
   }
}
Equal!

Requirements

Header file <msclr\lock.h>

Namespace msclr

See Also

Reference

lock::operator!=

Other Resources

lock Members