Afficher en anglais Édition

Partage via


HashCode.GetHashCode Method

Definition

Caution

HashCode is a mutable struct and should not be compared with other HashCodes. Use ToHashCode to retrieve the computed hash code.

This method is not supported and should not be called.

C#
[System.Obsolete("HashCode is a mutable struct and should not be compared with other HashCodes. Use ToHashCode to retrieve the computed hash code.", true)]
public override int GetHashCode();

Returns

This method will always throw a NotSupportedException.

Attributes

Exceptions

Always thrown when this method is called.

Applies to

Produit Versions (Obsolète)
.NET (Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10)
.NET Standard (2.0 (package-provided), 2.1)