DataGrid.HitTestInfo.GetHashCode Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient le code de hachage pour l'instance DataGrid.HitTestInfo.
public:
override int GetHashCode();
public override int GetHashCode ();
override this.GetHashCode : unit -> int
Public Overrides Function GetHashCode () As Integer
Retours
Code de hachage de cette instance.
Exemples
L’exemple suivant imprime le code de hachage du 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() );
}
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 " + myHitTest.GetHashCode().ToString());
}
Private Sub dataGrid1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
Dim newLine As String = ControlChars.Cr
Console.WriteLine(newLine)
Dim myHitTest As System.Windows.Forms.DataGrid.HitTestInfo
' 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()))
End Sub
Remarques
Cette méthode se substitue à GetHashCode.