Читати англійською Редагувати

Поділитися через


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.

C#
[System.Runtime.InteropServices.ComVisible(false)]
public override int GetHashCode();

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.

C#
Console.WriteLine("\nGet the hashcode for the evidence.");
Console.WriteLine("HashCode = " + myEvidence.GetHashCode().ToString());

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

Продукт Версії
.NET Framework 2.0, 3.0, 3.5