lock::operator!=

不等运算符。

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

参数

  • t
    比较的对象进行不相等。

返回值

返回 true ,如果 t 用锁定的对象不同,否则 false 。

示例

// 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!");
   }
}
  

要求

头文件 <msclr \ lock.h>

命名空间 msclr

请参见

参考

lock::operator==

其他资源

锁定成员