lock::operator!=

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at lock::operator!=.

Inequality operator.

Syntax

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

lock Members
lock::operator==