Evidence.GetHashCode Method

Definition

Gets a hash code for the Evidence object that is suitable for use in hashing algorithms and data structures such as a hash table.

public:
 override int GetHashCode();
[System.Runtime.InteropServices.ComVisible(false)]
public override int GetHashCode ();
override this.GetHashCode : unit -> int
Public Overrides Function GetHashCode () As Integer

Returns

A hash code for the current Evidence object.

Attributes

Examples

The following code example shows the use of the GetHashCode method. This example is part of a larger example provided for the Evidence class.

Console.WriteLine(ControlChars.Lf & "Get the hashcode for the evidence.")
Console.WriteLine(("HashCode = " & myEvidence.GetHashCode().ToString()))
Console.WriteLine("\nGet the hashcode for the evidence.");
Console.WriteLine("HashCode = " + myEvidence.GetHashCode().ToString());
Console::WriteLine( "\nGet the hashcode for the evidence." );
Console::WriteLine( "HashCode = {0}", myEvidence->GetHashCode() );

Remarks

The hash code for two instances of the same evidence might be different, Therefore, hash codes should not be used to compare two Evidence objects.

Applies to