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 override int GetHashCode()

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";
   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 " + myHitTest.GetHashCode().ToString());

.NET Framework
Available since 1.1
Return to top