DataGrid::HitTestInfo::Equals Method (Object^)

 

Indicates whether two objects are identical.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public:
virtual bool Equals(
	Object^ value
) override

Parameters

value
Type: System::Object^

The second object to compare, typed as Object.

Return Value

Type: System::Boolean

true if the objects are equal; otherwise, false.

The following example tests whether the user is clicking an area of the grid that is not valid.

private:
   void dataGrid1_MouseDown( Object^ /*sender*/,
     System::Windows::Forms::MouseEventArgs^ e )
   {
      if ( dataGrid1->HitTest( e->X, e->Y )->Equals(
         DataGrid::HitTestInfo::Nowhere ) )
      {
         Console::WriteLine( "Nowhere" );
      }
   }

.NET Framework
Available since 1.1
Return to top
Show: