DataGrid.HitTestInfo.GetHashCode 메서드

정의

DataGrid.HitTestInfo 인스턴스의 해시 코드를 가져옵니다.

public:
 override int GetHashCode();
public override int GetHashCode ();
override this.GetHashCode : unit -> int
Public Overrides Function GetHashCode () As Integer

반환

Int32

이 인스턴스의 해시 코드입니다.

예제

해시 코드를 인쇄 하는 다음 예제는 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

설명

이 메서드는 GetHashCode를 재정의합니다.

적용 대상

추가 정보