Compartir a través de


lock::operator!=

Inequality operator.

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

Parameters

  • t
    The object to compare for inequality.

Return Value

Returns true if t differs from the lock's object, false otherwise.

Example

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

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

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

Requirements

Header file <msclr\lock.h>

Namespace msclr

See Also

Reference

lock::operator==

Other Resources

lock Members