DataGrid.HitTestInfo インスタンスのハッシュ コードを取得します。
Overrides Public Function GetHashCode() As Integer
[C#]
public override int GetHashCode();
[C++]
public: int GetHashCode();
[JScript]
public override function GetHashCode() : int;
戻り値
対象のインスタンスのハッシュ コード。
解説
このメソッドは、 GetHashCode をオーバーライドします。
使用例
[Visual Basic, C#, C++] DataGrid.HitTestInfo のハッシュ コードを出力する例を次に示します。
Protected Sub dataGrid1_MouseDown(sender As Object, 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 'dataGrid1_MouseDown
[C#]
protected 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());
}
[C++]
protected:
void dataGrid1_MouseDown(Object* /*sender*/, System::Windows::Forms::MouseEventArgs* e)
{
String* newLine = S"\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(S"Hashcode {0}", __box(myHitTest->GetHashCode()));
}
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, .NET Compact Framework - Windows CE .NET
参照
DataGrid.HitTestInfo クラス | DataGrid.HitTestInfo メンバ | System.Windows.Forms 名前空間 | DataGrid | DataGrid.HitTestType | HitTest