DataGrid::HitTestInfo::GetHashCode Method ()

 

Gets the hash code for the DataGrid::HitTestInfo instance.

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

public:
virtual int GetHashCode() override

Return Value

Type: System::Int32

The hash code for this instance.

This method overrides GetHashCode.

The following example prints the hash code of the DataGrid::HitTestInfo.

private:
   void dataGrid1_MouseDown( Object^ /*sender*/,
      System::Windows::Forms::MouseEventArgs^ e )
   {
      String^ newLine = "\n";
      Console::WriteLine( newLine );
      System::Windows::Forms::DataGrid::HitTestInfo^ myHitTest;
      // Use the DataGrid control's HitTest method with the x and y properties.
      myHitTest = dataGrid1->HitTest( e->X, e->Y );
      Console::WriteLine( "Hashcode {0}", myHitTest->GetHashCode() );
   }

.NET Framework
Available since 1.1
Return to top
Show: